home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / tvtool2.zip / TOOL.TXT < prev    next >
Text File  |  1993-07-20  |  199KB  |  4,155 lines

  1. OVERVIEW
  2.  
  3. TV Tool Box copyright (c) 1992,93 Richard W. Hansen
  4. All rights reserved.
  5.  
  6. The TV Tool Box library was created to enhance the Turbo Vision framework
  7. for Turbo Pascal. TV Tool Box includes formatted data entry with input masks,
  8. scrolling data entry dialogs, versatile control for data entry field
  9. locking, check mark menus, enhancements to TApplication, string routines, 3D
  10. controls, 3D tool bars, iconizable windows, popup menus, virtual list boxes,
  11. slider controls, spin controls, and more.
  12.  
  13. TV Tool Box is distributed as Shareware, IT IS NOT FREE. If you use TV Tool
  14. Box, please register it. Your registration will allow me to create future
  15. versions of this product. TV Tool Box is a work in progress, it is by no
  16. means complete. What happens in the future versions is up to you. If you have
  17. any ideas for new TV extensions please let me know and I will try to include
  18. them. Future versions will be available to registered users for a nominal
  19. fee.
  20.  
  21.  
  22. DEFINITION OF SHAREWARE
  23.  
  24. Shareware distribution gives users a chance to try software before buying it.
  25. If you try a Shareware program and continue using it, you are expected to
  26. register. With registration, you will get printed documentation, a copy of
  27. the latest version with readable source and a disk of bonus utilities, source
  28. code, and programs.
  29.  
  30. Copyright laws apply to both Shareware and commercial software, and the
  31. copyright holder retains all rights, with a few specific exceptions as stated
  32. below. Shareware authors are accomplished programmers, just like commercial
  33. authors, and the programs are of comparable quality. (In both cases, there
  34. are good programs and bad ones!) The main difference is in the method of
  35. distribution. The author specifically grants the right to copy and distribute
  36. the software, either to all and sundry or to a specific group. For example,
  37. some authors require written permission before a commercial disk vendor may
  38. copy their Shareware.
  39.  
  40. Shareware is a distribution method, not a type of software. You should find
  41. software that suits your needs and pocketbook, whether it's commercial or
  42. Shareware. The Shareware system makes fitting your needs easier, because you
  43. can try before you buy. And because the overhead is low, prices are low also.
  44. Shareware has the ultimate money-back guarantee -- if you don't use the
  45. product, you don't pay for it.
  46.  
  47.  
  48. DISCLAIMER
  49.  
  50. Users of TV Tool Box must accept this disclaimer of warranty: "TV TOOL BOX is
  51. supplied as is. The author disclaims all warranties, expressed or implied,
  52. including, without limitation, the warranties of merchantability and of
  53. fitness for any purpose. The author assumes no liability for damages, direct
  54. or consequential, which may result from the use of TV TOOL BOX."
  55.  
  56.  
  57. LICENSE AGREEMENT
  58.  
  59. TV TOOL BOX is a "Shareware package" and is provided at no charge to the user
  60. for evaluation. Feel free to share, but please do not give it away altered or
  61. as part of another package. If you find this program useful and find that you
  62. are using TV TOOL BOX and continue to use TV TOOL BOX after a reasonable
  63. trial period, you must make a registration payment of $40.00 to Richard
  64. Hansen. The $40.00 registration fee will license one copy for use on any one
  65. computer at any one time, site licenses are available by contacting Richard
  66. Hansen. You must treat this software just like a book. Each licensed copy may
  67. be used by only one person at a time, just as a book cannot be read by two
  68. different persons at the same time.
  69.  
  70. Anyone distributing TV TOOL BOX for any kind of remuneration must first
  71. contact Richard Hansen for authorization.
  72.  
  73.  
  74. BECOMING A REGISTERED OWNER OF TV TOOL BOX
  75.  
  76. You may register by check, money order, credit card, or online on the
  77. CompuServe information service. All registrations are $40.00 plus $5.00
  78. shipping and handling.
  79.  
  80. Checks or money orders are prefered if possible. Please make all checks
  81. payable in U.S. dollars, drawn on a U.S. bank. Orders paid by check drawn on
  82. a non-U.S. bank will be returned. I apologize for any inconvenience but high
  83. bank charges, roughly 50%, make this necessary.
  84.  
  85. You can also register online on CompuServe. Type GO SWREG, and follow the
  86. prompts. The Registration Id for CompuServe is 1121. All Compuserve
  87. registrations are $45.00, including shipping and handling.
  88.  
  89. You may place an order by Master Card, VISA, American Express, or Discover by
  90. contacting Public Software Library at (800) 242-4PSL (from overseas
  91. (713) 524-6394), by FAX at (713) 524-6398, or on CompuServe at 71355,470.
  92. These numbers are for credit card orders only! Please, do not call these
  93. numbers for any type of technical assistance. The Registration Id for PSL is
  94. 10896. All PSL registrations are $45.00, including shipping and handling.
  95.  
  96. Site licenses and multiple copy discounts are available. Remember a
  97. registered copy is required for each programmer using TV Tool Box.
  98.  
  99. Please contact me with any comments, suggestions, problems, bugs, or
  100. questions.
  101.  
  102. Richard Hansen
  103. PO Box 18571
  104. Saint Paul, MN  55118-0571  USA
  105.  
  106. CompuServe : 70242,3367
  107. InterNet   : 70242.3367@compuserve.com
  108. FidoNet    : 1:282/115
  109.  
  110.  
  111. DEMO
  112.  
  113. The file Demo.exe is the main demo for TV Tool Box. This demo shows most of
  114. the features of TV Tool Box. Choose the [Test] option off the main menu bar
  115. to check them out. Select [Data Entry] to test some new data entry
  116. features. TV Tool Box supports formatted data entry using programmer supplied
  117. entry mask strings. You can include literals, such as '(' or '-' in your
  118. masks, that cannot be typed over by your users. The data entry features also
  119. include, field locking, hidden password fields, justification, trimming, and
  120. alternate padding chars.
  121.  
  122. If you ever wanted a little fancier look in your TV apps (dare I say it),
  123. like Visual Basic for DOS, check out the 3D controls. The 3D controls include
  124. a vertical or horizontal tool bar (almost like MS Windows?), 3D buttons
  125. that can have up to two lines of text, 3D input lines, 3D list boxes, 3D
  126. history lists, etc.
  127.  
  128. Select [Check Marks] and try out the check mark enhancement for menus.
  129.  
  130. If you have need of a ASCII/HEX editor, like those used in disk utilities,
  131. now you have got one. Select [Ascii/Hex Editor] to check it out.
  132.  
  133. Have you ever wanted a simple way to display some text without creating a
  134. dialog box or window and a specialized Draw method, try the [Text Display
  135. Window] option. This will display a TbxTextWindow object. With TbxTextWindow
  136. you just create it and use the Write method to display string, almost like
  137. writing to the screen without Turbo Vision.
  138.  
  139. If you select [Message Dialog], you can check out a replacement for the
  140. MessageBox procedure. A TbxMessageDialog will automatically size itself for
  141. the number and length of the lines of text you insert into it.
  142.  
  143. On the [Setup] menu, you can setup a neat idea I stole from my favorite
  144. programmer's text editor "Multi-Edit" from American Cybernetics, Inc. If you
  145. check the option, the mouse cursor will be turned off whenever the keyboard
  146. is used. The mouse cursor is restored whenever the mouse is moved or a mouse
  147. button is pressed.
  148.  
  149. Included in TV Tool Box is a descendant of TDialog called TbxRunDialog. A
  150. TbxRunDialog is used to create progress display dialogs for things like
  151. printing, copying files, etc. TbxRunDialog has easy an method for
  152. implementing pause, continue, and cancel. There are two ready made
  153. descendants of TbxRunDialog, TbxPercentDialog and TbxPrintDialog.
  154. TbxPercentDialog displays the percentage completion with a progress bar.
  155. TbxPrintDialog is a skeleton for a printing dialog. Select [Progress Dialog]
  156. or [Print Dialog] to try them out.
  157.  
  158. [Virtual List Boxes] provide a list box that is perfect for database work or
  159. whenever you have a list that is too large a normal TCollection. Virtual
  160. list boxes display a only a portion of a larger (perhaps very much larger)
  161. list. Virtual list boxes can page through the list or jump to the beginning
  162. or end of the list. The demo implements a list of all integers from 1 -
  163. 99999. This is obviously too large for a TCollection which can handle a
  164. maximum of 16K elements.
  165.  
  166. I have added a couple enhancements to TWindows. A TbxWindow can be minimized,
  167. using the "minimize" icon in the upper right corner. If you hit Alt-Minus,
  168. or press the right mouse button on the "close" icon, a window control menu
  169. will popup.
  170.  
  171. Please be sure and check out the file Scroll.exe for a look at scrolling
  172. dialogs and data entry windows.
  173.  
  174.  
  175. GETTING STARTED
  176.  
  177. TV Tool Box is broken into several units. The unit names and their contents
  178. generally correspond with the associated Turbo Vision units :
  179.  
  180. TVDEFS.INC     Some defs that change the compilation.
  181. TVCONST.PAS    Global constants.
  182. TVTYPE.PAS     Global types.
  183. TVSTRING.PAS   String handling routines.
  184. TVINPUT.PAS    Extensions of TInputLine and other data entry objects.
  185. TVVIEWS.PAS    Extensions of TView and other objects defined in Views.pas.
  186. TVDIALOG.PAS   Extensions of TDialog and other objects defined in Dialogs.pas.
  187. TVAPP.PAS      Extensions of TApplication from App.pas.
  188. TVMENUS.PAS    Extension of menu objects in Menus.pas.
  189. TVSCROLL.PAS   Scrolling dialog boxes and data entry windows.
  190. TV3D.PAS       3D dialog boxes and control objects.
  191.  
  192. Just copy the source code into your working directory or one that is
  193. identified in "unit paths" of your compiler configuration. The first time you
  194. compile, make sure to do a "build" or "make" so the needed TPUs will be
  195. created. If you compile "Demo.pas" and "Scroll.pas", all the TPUs will be
  196. created.
  197.  
  198. All objects and types defined by TV Tool Box begin with the prefix "Tbx" all
  199. object pointer types begin with the prefix "Pbx". This will allow you to
  200. easily identify a TV Tool Box type and should avoid problems with like named
  201. objects in other libraries. This naming convention is changed from version
  202. 1.0 and may cause you some minor conversion problems. The intent was to
  203. provide some standardization and a base to build on in future versions. I
  204. apologize if this causes undue difficulties, but it seemed the best method to
  205. bring a little order to the library.
  206.  
  207. TV Tool Box is supplied in source code form, to avoid compilation problems.
  208. Don't bother trying to read it though, it has been pretty well mangled and is
  209. very hard to read. THE FULL READACLE SOURCE CODE IS INCLUDED WITH THE
  210. REGISTERED VERSION.
  211.  
  212. When compiling you should use the X+, B+, and V- compiler directives. These
  213. directives are set as the default in all the TV Tool Box units.
  214.  
  215. This documentation should have a familiar look, as I tried to copy the
  216. Borland style as much as possible (without going nuts). One difference is
  217. that each object entry title lists the parent object, if any, in parentheses
  218. immediately following the object name, i.e.  Tbx3DButton (TButton).
  219.  
  220.  
  221. TV TOOL BOX DEVELOPMENT TOOLS
  222.  
  223. TV Tool Box is actively supported by PtGen. PtGen is a Turbo Vision 2.0
  224. screen generator. You can reach the author of PtGen, Berend de Boer, at:
  225.  
  226.   CompuServe : 100120,3121
  227.   InterNet   : berend@contrast.wlink.nl
  228.   FidoNet    : 2:281/527.23
  229.  
  230. PtGen can create the layout for a whole application or a single dialog
  231. box. It is completely visual and interactive. Highlights of PtGen,
  232. besides supporting TV Tool Box are:
  233.  
  234. *  creates complete applications or standalone dialog boxes
  235. *  quick interactive menu building
  236. *  quick interactive status line building
  237. *  quick interactive dialog box building
  238. *  full helptext support for status line help as well as helpfiles (.HLP)
  239. *  a tutorial, covering creation of status lines, menus, and dialog boxes
  240.  
  241. PtGen currently supports all 3D controls of TV Tool Box. Basic support for
  242. the TbxEditLine (including mask definition) is also provided. Planned
  243. enhancements include supporting all input lines and support for scrolling
  244. dialog boxes.
  245.  
  246. Registered users of PtGen receive 25% reduction on their TV Tool Box package,
  247. just as registered users of TV Tool Box receive 25% reduction on their PtGen
  248. package. The shareware version of PtGen is shipped with every registered
  249. version of TV Tool Box.
  250.  
  251.  
  252. REFERENCE
  253.  
  254. AllBlanks function                                              TvString
  255. ──────────────────────────────────────────────────────────────────────────────
  256. Declaration    Function AllBlanks(const S: String): Boolean;
  257. Function        Test for an empty string. Returns True if string S is null or
  258.                 all spaces.
  259.  
  260. AssignOutput procedure                                          TvViews
  261. ──────────────────────────────────────────────────────────────────────────────
  262. Declaration    Procedure AssignOutput(var F: Text; AWindow: PbxTextWindow);
  263. Function        AssignOutput is used to redirect the output from Write and
  264.                 Writeln statements to a TbxTextWindow. To send the normal
  265.                 Writeln output to a window instead of the CRT, pass Output
  266.                 (the standard Pascal output device) in the parameter F. The
  267.                 window passed in the AWindow parameter MUST NOT be closed
  268.                 until the output has been reset.
  269.  
  270.                 AssignOutput(Output, ATextWin);
  271.                 Rewrite(Output);
  272.                 Writeln('SOME TEXT');
  273.                 ....
  274.                 Close(Output);
  275.                 Assign(Output, '');
  276.                 Rewrite(Output);
  277. See also        TbxTextWindow
  278.  
  279. BarChar variable                                                TvDialog
  280. ──────────────────────────────────────────────────────────────────────────────
  281. Declaration    BarChar : Char = '';
  282. Function        Used to draw the unfilled portion of a progress bar in
  283.                 TbxPercentDialogs.
  284. See also        BarFillChar, TbxPercentDialog
  285.  
  286. BarFillChar variable                                            TvDialog
  287. ──────────────────────────────────────────────────────────────────────────────
  288. Declaration    BarFillChar : Char = '';
  289. Function        Character that draws the filled portion of a progress bar in
  290.                 TbxPercentDialogs.
  291. See also    BarChar, TbxPercentDialog
  292.  
  293. Blanks function                                                 TvString
  294. ──────────────────────────────────────────────────────────────────────────────
  295. Declaration    Function Blanks(Len: Byte): String;
  296. Function    Return a string of Len spaces.
  297. See also    Chars
  298.  
  299. BusyWindow variable                                             TvApp
  300. ──────────────────────────────────────────────────────────────────────────────
  301. Declaration    BusyWindow  : PbxBusyWindow = nil;
  302. Function        Stores a pointer to the application's busy message display
  303.                 window. BusyWindow is initialized by TbxApplication.Init.
  304. See also        TbxApplication.HideBusy, TbxApplication.ShowBusy,
  305. TbxBusyWindow
  306.  
  307. ButtonNormal variable                                           Tv3D
  308. ──────────────────────────────────────────────────────────────────────────────
  309. Declaration    ButtonNormal : TbxFrameArray = '';
  310. Function        Defines the frame characters used to draw a normal unselected
  311.                 3D button.
  312. See also        ButtonPress, ButtonSelect,
  313. OutlineNormal
  314.  
  315. ButtonPress variable                                            Tv3D
  316. ──────────────────────────────────────────────────────────────────────────────
  317. Declaration    ButtonPress : TbxFrameArray = '';
  318. Function    Defines the frame characters used to draw a pressed 3D button.
  319. See also    ButtonNormal, ButtonSelect, OutlineNormal
  320.  
  321. ButtonSelect variable                                           Tv3D
  322. ──────────────────────────────────────────────────────────────────────────────
  323. Declaration    ButtonSelect :TbxFrameArray = '';
  324. Function        Defines the frame characters used to draw a selected 3D button.
  325. See also    ButtonNormal, ButtonPress, OutlineNormal
  326.  
  327. Chars function                                                  TvString
  328. ──────────────────────────────────────────────────────────────────────────────
  329. Declaration    Function Chars(Len: Byte; Ch: Char): String;
  330. Function     Return a string of size Len characters of Ch.
  331. See also    Blanks
  332.  
  333. CheckMark variable                                              TvMenus
  334. ──────────────────────────────────────────────────────────────────────────────
  335. Declaration    CheckMark : String[10] = '';
  336. Function        This is text used to indicate selected check mark menu items.
  337.                 The marker is normally a check mark, but could be any text
  338.                 such as 'ON'. CheckMark is used with CheckMarkNull to
  339.                 indicate the state of a check mark menu item. It must be the
  340.                 length, or padded with spaces to the length stored in
  341.                 CheckMarkLen.
  342. See also        CheckMarkLen, CheckMarkNull, NewMarkedItem, TbxMenuBar
  343.  
  344. CheckMarkNull variable                                          TvMenus
  345. ──────────────────────────────────────────────────────────────────────────────
  346. Declaration    CheckMarkNull : String[10] = ' ';
  347. Function        CheckMarkNull is the text used to clear unselected check mark
  348.                 menu items. It would normally be one space, but could be any
  349.                 text such as 'OFF'. CheckMarkNull is used with CheckMark to
  350.                 indicate the state of a check mark menu item. It must be the
  351.                 length, or padded with spaces to the length stored in
  352.                 CheckMarkLen.
  353.  
  354. See also    CheckMark, CheckMarkLen, NewMarkedItem, TbxMenuBar
  355.  
  356. CheckMarkLen variable                                           TvMenus
  357. ──────────────────────────────────────────────────────────────────────────────
  358. Declaration    CheckMarkLen : Byte = 1;
  359. Function        CheckMark and CheckMarkNull must both be exactly this length.
  360.                 They can be any text like "Yes" and "No ", or "ON " and
  361.                 "OFF", but they must be the same length and that length must
  362.                 be exactly CheckMarkLen bytes.
  363. See also        CheckMark, CheckMarkNull, NewMarkedItem, TbxMenuBar
  364.  
  365. cmXXXX constants                                                TvConst
  366. ──────────────────────────────────────────────────────────────────────────────
  367.                 Command         Value   Meaning
  368.                 cmFirstPage     246     Issued to a virtual list box to move
  369.                                         to the top of the list.
  370.                 cmLastPage      247     Sent to a virtual list box to move to
  371.                                         the bottom of the list.
  372.                 cmNextPage      248     Issued to a virtual list box to move
  373.                                         to the next page in the list.
  374.                 cmPrevPage      249     Sent to a virtual list box to move
  375.                                         to the previous page in the list.
  376.                 cmMaximize      250     Maximize a window.
  377.                 cmMinimize      251     Minimize a window.
  378.                 cmStartJob      252     Used to start processing in a
  379.                                         TbxRunDilaog.
  380.                 cmPauseJob      253     Pauses processing in a TbxRunDialog.
  381.                 cmContinueJob   254     Restarts TbxRunDialog processing.
  382.                 cmCancelJob     255     Cancels the processing of a
  383.                                         TbxRunDialog.
  384.                 cmMarkStart     10000   Start of marked menu items.
  385.                 cmMarkEnd       11000   End of marked menu items. Start and
  386.                                         End are used by HandleEvent to toggle
  387.                                         menu markers.
  388.                 cmCursorMoved   11001   TbxEditBuff uses this command to
  389.                                         communicate when the cursor has moved
  390.                                         and other peer views should update
  391.                                         the cursor position.
  392.                 cmUpdateView    11002   Used by TbxEditBuff to tell the
  393.                                         parent and peer views that data needs
  394.                                         to be redisplayed.
  395.                 cmEditView      11003   TbxEditBuff uses this command to
  396.                                         inform its parent view that data has
  397.                                         been edited.
  398.                 cmPrint         11004   Command to tell a window to print
  399.                                         its contents. Not currently used.
  400.                 cmJobComplete   11005   Issued by the process loop of a
  401.                                         TbxRunDialog when processing is
  402.                                         complete.
  403.                                         Causes the dialog box to be closed.
  404.                 cmPopMenu       11006   A TbxFrame broadcasts this command to
  405.                                         tell the parent window to popup a
  406.                                         window control menu.
  407.                 cmTakeItem      11007   Message used by TbxPairedListBoxes to
  408.                                         send data back and forth.
  409.                 cmDisplayStr    11008   Sent to a TbxTextWindow to write a
  410.                                         string to the window.
  411.                 cmDisplayClr    11009   Sent to a TbxTextWindow to clear its
  412.                                         display.
  413.                 cmDragView      11011   If a TbxScrollView receives this
  414.                                         command, it will go into
  415.                                         "resize/move" mode.
  416.                 cmIdentify      11012   Issued to a TbxEditLine to get its ID
  417.                                         number.
  418.                 cmSetId         11013   Sent to a TbxEditLine to set its ID
  419.                                         number.
  420.                 cmFieldError    11014   Sent to a parent dialog by a
  421.                                         TbxEditLine to display an error
  422.                                         message.
  423.  
  424. CompareDate function                                            TvType
  425. ──────────────────────────────────────────────────────────────────────────────
  426. Declaration     Function CompareDate(Date1: TbxDateRec;
  427.                                      Date2: TbxDateRec): Integer;
  428. Function        Compares two dates and returns 1 if Date1 is greater than
  429.                 Date2, -1 if Date1 is less than Date2, and 0 if the Date1
  430.                 equals Date2. This routine is intended mainly for use by the
  431.                 TbxDate object.
  432. See also        TbxDate, TbxDateRec
  433.  
  434. CopyInto procedure                                              TvString
  435. ──────────────────────────────────────────────────────────────────────────────
  436. Declaration     Procedure CopyInto(const InStr: String; Column: Byte;
  437.                                    var OutStr: String);
  438. Function        Copy InStr into OutStr starting from position Column and
  439.                 return the result in OutStr. The result is returned in
  440.                 OutStr. This routine is great for creating formatted output.
  441.                 This is not just another Insert. It does not move any chars
  442.                 as Insert does, it just overwrites characters in the existing
  443.                 string. CopyInto will not copy beyond the end of the
  444.                 destination string (OutStr).
  445. See also    FCopyInto
  446.  
  447. DateSlash constant                                              TvType
  448. ──────────────────────────────────────────────────────────────────────────────
  449. Declaration    DateSlash : Char = '/';
  450. Function        The date separator character used in creating formatted date
  451.                 strings. All date format masks should contain a "/" character
  452.                 to separate month, day, and year fields. The "/" is replaced
  453.                 by the DateSlash character in the formatted output.
  454. See also        DateToDateString, TbxDate
  455.  
  456. DateToDateString function                                       TvType
  457. ──────────────────────────────────────────────────────────────────────────────
  458. Declaration     Function DateToDateString(Date: TbxDateRec;
  459.                                           Picture: TbxDateSt): TbxDateSt;
  460. Function        Convert Date to a string, following the formatting
  461.                 instructions in Picture. Picture must be a string like
  462.                 "mm/dd/yy", "DD/MM/YYYY", etc. The characters "d", "D", "m",
  463.                 "M", "y", "Y" or "/" are the only characters used in
  464.                 formatting the output.
  465.  
  466.                 "d" or "D" specifies the position of the day, "m" or "M"
  467.                 specifies the position of the month, and "y" or "Y" specifies
  468.                 the position of  the year in the output. Day, Month, and Year
  469.                 may be separated by a forward slash, "/". Days and months
  470.                 would normally be two characters, years may be up to four
  471.                 characters. Any "/" characters in the mask will be replaced
  472.                 by the character in the DateSlash constant.
  473.  
  474.                 Unused day, month, or year characters in Picture will be
  475.                 replaced by spaces or zeros in the output. If a format
  476.                 character is upper case it is replaced by a space. If a
  477.                 format character is lower case it is replaced by zero.
  478.  
  479.                 This routine is intended mainly for use by the TbxDate
  480.                 object.
  481. See also        ExtractDateFromString, TbxDate
  482.  
  483. DaysInMonth function                                            TvType
  484. ──────────────────────────────────────────────────────────────────────────────
  485. Declaration    Function DaysInMonth(Date: TbxDateRec): Word;
  486. Function        Returns the days in the month in the specified Date. The year
  487.                 value in Date must be valid, so that leap year can be checked.
  488.                 This routine is intended mainly for use by TbxDate.
  489. See also    TbxDate
  490.  
  491. DecimalPt constant                                              TvInput
  492. ──────────────────────────────────────────────────────────────────────────────
  493. Declaration    DecimalPt = '.';
  494. Function        Character used for decimal points in the floating point number
  495.                 editors.
  496. See also    TbxDoubleEdit, TbxFloatEdit, TbxRealEdit
  497.  
  498. DefaultDay variable                                             TvInput
  499. ──────────────────────────────────────────────────────────────────────────────
  500. Declaration     DefaultDay : Word = 0;
  501. Function    Supplies the default day value for a TbxDateEdit object.
  502. See also    DefaultMonth, DefaultYear, TbxDateEdit
  503.  
  504. DefaultYear variable                                            TvInput
  505. ──────────────────────────────────────────────────────────────────────────────
  506. Declaration     DefaultYear : Word = 0;
  507. Function    Supplies the default year value for a TbxDateEdit object.
  508. See also    DefaultDay, DefaultMonth, TbxDateEdit
  509.  
  510. DefaultMonth variable                                           TvInput
  511. ──────────────────────────────────────────────────────────────────────────────
  512. Declaration     DefaultMonth : Word = 0;
  513. Function    Supplies the default month value for a TbxDateEdit object.
  514. See also    DefaultDay, DefaultYear, TbxDateEdit
  515.  
  516.  
  517. dfXXXX constants                                                TvInput
  518. ──────────────────────────────────────────────────────────────────────────────
  519.                 These commands are used by TbxEditLine, its descendants, and
  520.                 other views inserted into a TbxEntryDialog.
  521.  
  522.                 Command         Value           Meaning
  523.                 dfRequired      $0001           Field entry is required.
  524.                 dfRJustify      $0002           Trim and Right justify result.
  525.                 dfLJustify      $0004           Trim and Left justify result.
  526.                 dfTrim          $0008           Trim all pad chars from result
  527.                 dfHide          $0010           Password input.
  528.                 dfDefaults      $0020           If this option is set the field
  529.                                                 may use default values to fill
  530.                                                 in missing data. Currently only
  531.                                                 date edit controls have default
  532.                                                 values.
  533. See also        TbxEditLine
  534.  
  535. EditMask characters                                             TvInput
  536. ──────────────────────────────────────────────────────────────────────────────
  537.                 These characters are used to create edit masks for
  538.                 TbxEditLine and its descendants. The only editable characters
  539.                 in an edit mask are where one of these characters appear.
  540.                 Each mask character has a set of valid characters associated
  541.                 with it. Only the characters associated with a mask character
  542.                 will be accepted by the edit line.
  543.  
  544.                 Character       Function
  545.                 X               Any character.
  546.                 U               Any character, force upper case
  547.                 L               Any character, force lower case
  548.                 a               Alpha numeric only
  549.                 u               Alpha numeric only, force upper case
  550.                 l               Alpha numeric only, force lower case
  551.                 #               Numbers, minus sign, period
  552.                 9               Numbers only
  553.                 &               Hexadecimal numbers
  554.                 @               Dates (internal use only)
  555. See also    TbxEditLine
  556.  
  557. ExtractDateFromString procedure                                 TvType
  558. ──────────────────────────────────────────────────────────────────────────────
  559. Declaration     Procedure ExtractDateFromString(var Date: TbxDateRec;
  560.                                                 Picture: TbxDateSt;
  561.                                                 ADateSt: TbxDateSt);
  562. Function        Extracts a TbxDateRec from the date string ADateSt. Date is
  563.                 extracted from the string ADateSt using the mask Picture. In
  564.                 Picture a "m", or "M" indicates the position of the month, a
  565.                 "d" or "D" locates the position of the day, and "y" or "Y"
  566.                 indicates the position of the year.
  567.  
  568.                 This routine is intended mainly for use by TbxDate.
  569. See also    DateToDateString, TbxDate
  570.  
  571. FCopyInto function                                              TvString
  572. ──────────────────────────────────────────────────────────────────────────────
  573. Declaration     Function FCopyInto(const InStr: String; Column: Byte;
  574.                                    OutStr: String): String;
  575. Function        Copy InStr into OutStr starting from position Column and
  576.                 resturn the result. This routine is great for creating
  577.                 formatted output. This is not just another Insert. It does
  578.                 not move any chars as Insert does, it just overwrites
  579.                 characters in the existing string. FCopyInto will not copy
  580.                 beyond the end of the destination string (OutStr).
  581. See also        CopyInto
  582.  
  583. FLeftPad function                                               TvString
  584. ──────────────────────────────────────────────────────────────────────────────
  585. Declaration    Function FLeftPad(S: String; Len: Byte): String;
  586. Function    Return string S left padded to length Len with spaces.
  587. See also    LeftPad
  588.  
  589. FLeftPadCh function                                             TvString
  590. ──────────────────────────────────────────────────────────────────────────────
  591. Declaration    Function FLeftPadCh(S: String; Len: Byte; Ch: Char): String;
  592. Function    Return string S left padded to length Len with character Ch.
  593. See also    LeftPadCh
  594.  
  595. FormatF function                                                TvString
  596. ──────────────────────────────────────────────────────────────────────────────
  597. Declaration     Function FormatF(const Mask: TbxNumberMask; Flt: Double;
  598.                                  DP : Integer): String;
  599.                                    - or -
  600.                 Function FormatF(const Mask: TbxNumberMask; Flt: Real;
  601.                                  DP : Integer): String;
  602. Function        Returns a formatted string from floating point number Flt
  603.                 according to the formatting instructions contained in Mask
  604.                 and the maximum number of decimal places in DP. DP specifies
  605.                 the number of digits to the right of the decimal place to
  606.                 retain in the output. If DP is negative, the number of the
  607.                 digits is determined strictly by the output mask. DP can be
  608.                 used to align numbers with different decimals on the decimal
  609.                 point. Note : The maximum mask size is 30 characters.
  610.  
  611.                 The three characters #,@,& indicate how to format the output
  612.                 string. They serve as place holders in the mask for the
  613.                 digits in the number. All other characters are copied from
  614.                 the mask to the output unchanged.
  615.  
  616.                 In the output any unused # is replaced by a space, any unused
  617.                 @ is replaced by zero, and any unused & is deleted. The #,@,&
  618.                 characters can be mixed as desired in the mask. Given the
  619.                 same mask, calls to FormatF with different values of DP will
  620.                 return strings with the decimal points aligned.
  621.  
  622.                 If a number is too large to fit in the given mask, all digits
  623.                 in the output will be set to '*'.
  624.  
  625.                 Some examples :
  626.  
  627.                 Input                                   Output
  628.                 FormatF('#####.####', 12345.6789, 4)    12345.6789
  629.                 FormatF('#####.####', 12345.6789, 3)    12345.679
  630.                 FormatF('#####.####', 1234.5678, 3)      1234.568
  631.                 FormatF('#####.####', 12345.6789, -1)   12345.6789
  632.                 FormatF('##,###.###,#', 12345.6789, 4)  12,345.678,9
  633.                 FormatF('$ ##,###.####', 12345.6789, 4) $ 12,345.6789
  634.                 FormatF('$ ##,###.####', 123.4, 2)      $    123.4
  635.                 FormatF('$ ##,###.@@@@', 12345.6, 1)    $ 12,345.6000
  636.                 FormatF('$ &&,&&&.@@@@', 1234.56, 2)    $ 1,234.5600
  637.                 FormatF('$ &&,&&&.@@@@', 123.4, 2)      $ 123.4000
  638.                 FormatF('#####.####', 9999999.9999, 4)  *****.****
  639. See also    FormatI
  640.  
  641. FormatI                                                         TvString
  642. ──────────────────────────────────────────────────────────────────────────────
  643. Declaration     Function FormatI(const Mask: TbxNumberMask;
  644.                                  Long: LongInt): String;
  645. Function        Returns a formatted string created from the integer number
  646.                 Long according to the formatting instructions contained in
  647.                 the string Mask. Note: The maximum mask size is 30 characters.
  648.  
  649.                 The three characters #,@,& indicate how to format the output
  650.                 string. They serve as place holders in the mask for the
  651.                 digits in the number. All other characters are copied from
  652.                 the mask to the output unchanged.
  653.  
  654.                 In the output any unused # is replaced by a space, any unused
  655.                 @ is replaced by zero, and any unused & is deleted. The #,@,&
  656.                 can be mixed as desired in the mask. If a number is too large
  657.                 to fit in the given mask, all digits in the output will be
  658.                 set to *.
  659.  
  660.                 Some examples :
  661.  
  662.                 Input                           Output
  663.                 FormatI('#####', 999)             999
  664.                 FormatI('@@@@@', 999)           00999
  665.                 FormatI('&&&&&', 999)           999
  666.                 FormatI('##,###', 9999)          9,999
  667.                 FormatI('&&,&&&', 9999)         9,999
  668.                 FormatI('##,###', 999999)       **,***
  669. See also        FormatF
  670.  
  671. FPad function                                                   TvString
  672. ──────────────────────────────────────────────────────────────────────────────
  673. Declaration    Function FPad(S: String; Len: Byte): String;
  674. Function    Return string S right padded to length Len with spaces.
  675. See also    Pad
  676.  
  677. FPadCh function                                                 TvStrings
  678. ──────────────────────────────────────────────────────────────────────────────
  679. Declaration    Function FPadCh(S: String; Len: Byte; Ch: Char): String;
  680. Function    Return string S right padded to length Len with character Ch.
  681. See also    PadCh
  682.  
  683.  
  684. FStrip function                                                 TvString
  685. ──────────────────────────────────────────────────────────────────────────────
  686. Declaration    Function FStrip(S: String; const Chars: TbxCharSet): String;
  687. Function        Remove all occurrences of the characters in the set Chars from
  688.                 string S and return the result.
  689. See also    Strip
  690.  
  691. FTrim function                                                  TvString
  692. ──────────────────────────────────────────────────────────────────────────────
  693. Declaration    Function FTrim(S: String): String;
  694. Function    Return string S with leading and trailing blanks removed.
  695. See also    Trim
  696.  
  697. FTrimCh function                                                TvString
  698. ──────────────────────────────────────────────────────────────────────────────
  699. Declaration    Function FTrimCh(S: String; Ch: Char): String;
  700. Function        Return string S with all leading and trailing characters equal
  701.                 to Ch removed.
  702. See also    TrimCh
  703.  
  704. FTrimLead function                                              TvString
  705. ──────────────────────────────────────────────────────────────────────────────
  706. Declaration    Function FTrimLead(S: String): String;
  707. Function    Return string S with leading blanks removed.
  708. See also    TrimLead
  709.  
  710. FTrimLeadZero function                                          TvString
  711. ──────────────────────────────────────────────────────────────────────────────
  712. Declaration    Function FTrimLeadZero(S: String): String;
  713. Function    Return string S with leading zeros removed.
  714. See also    TrimLead
  715.  
  716. FTrimTrail function                                             TvString
  717. ──────────────────────────────────────────────────────────────────────────────
  718. Declaration    Function FTrimTrail(S: String): String;
  719. Function    Return string S with trailing blanks removed.
  720. See also    TrimTrail
  721.  
  722. FTruncateStr function                                           TvString
  723. ──────────────────────────────────────────────────────────────────────────────
  724. Declaration    Function FTruncateStr(S: String; Len: Byte): String;
  725. Function        If string S is longer than length Len, then truncate S to Len
  726.                 characters and return the result.
  727. See also    TruncateStr
  728.  
  729. gfXXXX constants                                                TvScroll
  730. ──────────────────────────────────────────────────────────────────────────────
  731.                 Any view in a TbxScrollWindow or TbxScrollDialog with this
  732.                 bit set in its GrowMode field will scroll as needed in the
  733.                 window or dialog box.
  734.  
  735.                 Command         Value   Meaning
  736.  
  737.                 gfScrollXY      $80     The view will scroll in the window or
  738.                                         dialog box.
  739.  
  740. HideChar variable                                               TvInput
  741. ──────────────────────────────────────────────────────────────────────────────
  742. Declaration    HideChar  : Char = '*';
  743. Function    Character used for password type entry in a TbxEditLine.
  744. See also    TbxEditLine, dfXXXX constants
  745.  
  746. HexString function                                              TvString
  747. ──────────────────────────────────────────────────────────────────────────────
  748. Declaration    Function HexString(I: LongInt): String;
  749. Function    Convert LongInt I to a hexadecimal string.
  750.  
  751. IsLeapYear function                                             TvType
  752. ──────────────────────────────────────────────────────────────────────────────
  753. Declaration    Function IsLeapYear(Year : Word): Boolean;
  754. Function        Returns True if Year is a leap year. Year must be a full four
  755.                 digit year. This routine is intended mainly for use by
  756.                 TbxDate.
  757. See also    TbxDate
  758.  
  759. LeftPad procedure                                               TvString
  760. ──────────────────────────────────────────────────────────────────────────────
  761. Declaration    Procedure LeftPad(var S: String; Len: Byte);
  762. Function    Return string S left padded to length Len with spaces.
  763. See also    FLeftPad
  764.  
  765. LeftPadCh procedure                                             TvString
  766. ──────────────────────────────────────────────────────────────────────────────
  767. Declaration    Procedure LeftPadCh(var S: String; Len: Byte; Ch: Char);
  768. Function    Return string S left padded to length Len with character Ch.
  769. See also    FLeftPadCh
  770.  
  771. mfXXXX constants                                                TvDialog
  772. ──────────────────────────────────────────────────────────────────────────────
  773.                 Constants used to set options in a TbxRunDialog. These are an
  774.                 extension of the set of mfXXXX constants found in the
  775.                 standard Turbo Vision file MSGBOX.PAS.
  776.  
  777.                 Command         Value   Meaning
  778.                 mfMessageLine   $1000   A TbxRunDialog initialization option
  779.                                         that will create a pointer to a
  780.                                         TStaticText message line in the
  781.                                         dialog box.  mfPauseButton
  782.                 $2000                   This will insert a "pause" button in
  783.                                         a TbxRunDialog.
  784.                 mfPauseCancel           Combines mfPauseButton and
  785.                                         mfCancelButton.
  786.                 mfOKPauseCancel         Combines mfOKCancel and mfPauseButton.
  787.  
  788. MousePopupMenu function                                         TvMenus
  789. ──────────────────────────────────────────────────────────────────────────────
  790. Declaration     Function MousePopupMenu(PopMenu: PMenuBox): Word;
  791. Function        Displays and executes, by calling ExecView, a popup menu.
  792.                 MousePopupMenu displays the menu at the current position of
  793.                 the mouse cursor and adjusts the menu positioning as needed
  794.                 to keep it within the desktop. MousePopupMenu returns the
  795.                 selected menu command.
  796. See also        PopupMenu
  797.  
  798. NewMarkedItem function                                          TvMenus
  799. ──────────────────────────────────────────────────────────────────────────────
  800. Declaration     Function NewMarkedItem(Name, Param: TMenuStr; KeyCode: Word;
  801.                                        Command: Word; AHelpCtx: Word;
  802.                                        Next: PMenuItem): PMenuItem;
  803. Function        Returns a PMenuItem, just like the standard menu function
  804.                 NewItem, adding the space needed for a check mark. If
  805.                 desired you can manually mark an item, just make sure that
  806.                 Name = Marker + ' ' + MenuItemName. If you want menu items
  807.                 to be checked and unchecked by the menu bar automatically,
  808.                 then Command should be from cmMarkStart through cmMarkEnd.
  809. See also        CheckMark, CheckMarkLen, CheckMarkNull, TbxMenuBar,
  810.                 cmXXXX constants
  811.  
  812. ofXXXX constants                                                TvConst
  813. ──────────────────────────────────────────────────────────────────────────────
  814. Used by various views to control setup options.
  815.  
  816. Command         Value   Meaning
  817. ofPosIndicator  $1000   Add a position indicator to the view.
  818. ofVScrollBar    $2000   Add a vertical scroll bar to the view.
  819. ofHScrollBar    $4000   Add a horizontal scroll bar to the view.
  820.  
  821. OutlineNormal variable                                          Tv3D
  822. ──────────────────────────────────────────────────────────────────────────────
  823. Declaration    OutlineNormal : TbxFrameArray = '';
  824. Function        Defines the frame characters used to draw a 3D outline.
  825.                 Outlines are drawn around 3D input lines, 3D check boxes, 3D
  826.                 radio buttons, etc.
  827. See also        ButtonNormal, ButtonPress, ButtonSelect
  828.  
  829. Pad procedure                                                   TvString
  830. ──────────────────────────────────────────────────────────────────────────────
  831. Declaration    Procedure Pad(var S: String; Len: Byte);
  832. Function    Return string S right padded to length Len with spaces.
  833. See also    FPad
  834.  
  835. PadCh procedure                                                 TvStrings
  836. ──────────────────────────────────────────────────────────────────────────────
  837. Declaration    Procedure PadCh(var S: String; Len: Byte; Ch: Char);
  838. Function    Return string S right padded to length Len with character Ch.
  839. See also    FPadCh
  840.  
  841. PopupMenu function                                              TvMenus
  842. ──────────────────────────────────────────────────────────────────────────────
  843. Declaration    Function PopupMenu(PopMenu: PMenuBox): Word;
  844. Function        Displays and executes, by calling ExecView, a popup menu.
  845.                 PopupMenu adjusts the menu positioning as needed to keep it
  846.                 within the desktop. PopupMenu returns the selected menu
  847.                 command.
  848. See also    MousePopupMenu
  849.  
  850. SetDateDefaults procedure                                       TvInput
  851. ──────────────────────────────────────────────────────────────────────────────
  852. Declaration    Procedure SetDateDefaults;
  853. Function        Call to set the default date values used in a TbxDateEdit
  854.                 control when user does not enter a complete date. Fills the
  855.                 constants DefaultDay, DefaultYear, DefaultMonth with the
  856.                 current system date values.
  857. See also        DefaultDay, DefaultMonth, DefaultYear, TbxDateEdit
  858.  
  859. Strip procedure                                                 TvString
  860. ──────────────────────────────────────────────────────────────────────────────
  861. Declaration    Procedure Strip(var S: String; const Chars: TbxCharSet);
  862. Function        Remove all occurrences of the characters in the set Chars
  863.                 from string S.
  864. See also    FStrip
  865.  
  866. TbxApplication (TApplication)                                   TvApp
  867. ──────────────────────────────────────────────────────────────────────────────
  868.                 TbxApplication sets up a TbxBusyWIindow, and has ready made
  869.                 methods for showing and erasing one. It also has a GetEvent
  870.                 method that turns off the mouse cursor when the keyboard is
  871.                 used.
  872.  
  873.                 TbxApplication implements two methods for closing all windows
  874.                 on the desktop. First, by a direct call the CloseAllWindows
  875.                 method. Second, by sending a cmCloseAll command to the
  876.                 application.
  877.  
  878. Fields ────────────────────────────────────────────────────────────────────
  879. MouseVisible     MouseVisible : Boolean;
  880.  
  881.                 Is the mouse cursor currently visible
  882.  
  883.  
  884.  
  885. ToggleMouse     ToggleMouse : Boolean;
  886.  
  887.                 Can the mouse cursor be toggled off when not in use? The
  888.                 default state is True.
  889.  
  890. Methods ───────────────────────────────────────────────────────────────────
  891. Init            Constructor Init;
  892.  
  893.                 Calls TAplication.Init, then creates BusyWindow and sets the
  894.                 mouse flags.
  895.  
  896. Load            Constructor Load(var S: TStream);
  897. CloseAllWindows    Procedure CloseAllWindows;
  898.  
  899.                 Executes a ForEach loop that instructs all open windows on
  900.                 the desktop to close.
  901.  
  902. GetEvent    Procedure GetEvent(var Event: TEvent); Virtual;
  903.  
  904.                 Calls TApplication.GetEvent, then, if ToggleMouse is True,
  905.                 shows or hides the mouse cursor as needed. Whenever a key is
  906.                 pressed the mouse cursor is hidden, whenever the mouse is
  907.                 moved or a button pressed the mouse cursor is displayed.
  908.  
  909. GetPalette    Function GetPalette: PPalette; Virtual;
  910.  
  911.                 Returns a pointer to the new default palette, CAppColor,
  912.                 CAppBlackWhite, or CAppMonochrome.
  913.  
  914. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  915.  
  916.                 Calls the inherited HandleEvent, then if the command is
  917.                 cmCloseAll, calls the CloseAllWindows method.
  918.  
  919. HideBusy    Procedure HideBusy;
  920.  
  921.                 Hides the BusyWindow by calling its Hide method.
  922.  
  923. SetMouseToggle    Procedure SetMouseToggle(const Enable: Boolean);
  924.  
  925.                 Sets the ToggleMouse flag.
  926.  
  927. ShowBusy    Procedure ShowBusy;
  928.  
  929.                 Displays the BusyWindow by calling its Show method.
  930.  
  931. Store           Procedure Store(var S: TStream);
  932. See also    TApplication, TbxBusyWindow
  933.  
  934. TbxAsciiBuff (TbxEditBuff)                                      TvViews
  935. ──────────────────────────────────────────────────────────────────────────────
  936.                 A descendant of TbxEditBuff for editing ascii data. This is
  937.                 the ascii edit buffer in the TbxEditBuffWindow object.
  938.  
  939. Methods ───────────────────────────────────────────────────────────────────
  940. Init            Constructor Init(Bounds: TRect; Buff: Pointer; BuffSize: Word;
  941.                                  AVScrollBar: PScrollBar);
  942.  
  943.                 Calls TbxEditBuff.Init setting ItemWidth to one. Buff is a
  944.                 pointer to the data buffer. BuffSize is the size of the data
  945.                 buffer. AVScrollBar is the scroll bar attached to the parent
  946.                 window and may be nil.
  947.  
  948. Draw            Procedure Draw; Virtual;
  949.  
  950.                 Overrides the inherited Draw to display the data buffer in
  951.                 ASCII character format.
  952.  
  953. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  954.  
  955.                 Accepts all characters 1 through 255, except Tab, for entry.
  956.                 When a valid character is typed it saves the character in the
  957.                 data buffer and broadcasts three messages: cmUpdateView,
  958.                 cmEditView, and kbRight.  These messages inform peer views to
  959.                 redraw, inform the parent to update the maximum edit
  960.                 position, and the cursor to move to the next character.
  961. See also    TbxAsciiHexEditor, TbxEditBuff, TbxHexBuff, TScroller
  962.  
  963. TbxAsciiHexEditor (TbxWindow)                                   TvViews
  964. ──────────────────────────────────────────────────────────────────────────────
  965.                 The TbxAsciiHexEditor object implements a ASCII/HEX editing
  966.                 window. It is just like those used with many disk utility
  967.                 programs. The window can be of any size, but to keep ASCII
  968.                 and Hex views in sync, in side by side views, there are a
  969.                 couple things to remember. The hex view will take twice as
  970.                 many chars to display the data as the ascii view. So the X
  971.                 dimension should be an even number that will allow one view
  972.                 to be exactly twice as big as the other. The X dimension
  973.                 should also be evenly divisible by 3. This will make sure
  974.                 that the hex display does not split a character across two
  975.                 rows. This said, make sure to account for the frame.
  976.  
  977.                 An example : a width of 62, allows 3 chars for the frame, and
  978.                 will give hex view 40 wide and an ascii view 20 wide.
  979.  
  980.                 Because of all the above, and because the right combination
  981.                 of gfGrow modes could not be found, the window is set up to
  982.                 only grow in the Y axis.
  983.  
  984. Fields ────────────────────────────────────────────────────────────────────
  985. MaxPos          MaxPos : Word;
  986.  
  987.                 Always contains the highest position edited in the data
  988.                 buffer.
  989.  
  990. LView           LView : PbxEditBuff;
  991.  
  992.                 Pointer to the hex editor view on the left side.
  993.  
  994. RView           RView : PbxEditBuff;
  995.  
  996.                 Pointer to the ascii editor view on the right side.
  997.  
  998. VScrollBar      VScrollBar : PbxMultiScrollBar;
  999.  
  1000.                 Pointer to a vertical scroll bar.
  1001.  
  1002. Indicator     Indicator : PbxPosIndicator;
  1003.  
  1004.                 Points to a view that displays the current cursor byte
  1005.                 position the data buffer.
  1006.  
  1007. Modified    Modified : Boolean;
  1008.  
  1009.                 Indicates if any characters in the data have been changed
  1010.                 since the window was created.
  1011.  
  1012. Methods ───────────────────────────────────────────────────────────────────
  1013. Init            Constructor Init(Bounds: TRect; ATitle: TTitleStr;
  1014.                                  ANumber: Integer; AOptions: Word;
  1015.                                  Buff: Pointer; BuffSize: Word);
  1016.  
  1017.                 Creates and inserts a hex editor and an ascii editor. The hex
  1018.                 editor is sized to be exactly twice as wide as the ascii
  1019.                 editor. Bounds.B.X is adjusted as needed to get the correct
  1020.                 overall width for the window. The AOptions param in Init only
  1021.                 uses the ofPosIndicator flag. ofPosIndicator tells the window
  1022.                 whether or not to insert a position indicator into the frame.
  1023.                 ATitle and ANumber are passed through to TWindow.Init.
  1024.  
  1025. Load            Constructor Load(var S: TStream);
  1026.  
  1027.                 Constructs the object from stream S by calling TWindow.Load,
  1028.                 then reading the new data belonging to TbxAsciiHexEditor.
  1029.                 The data buffer is not loaded from the stream. You must make
  1030.                 a call to the SetData method to establish the data buffer and
  1031.                 buffer size.
  1032.  
  1033. DataSize        Function DataSize: Word; Virtual;
  1034.  
  1035.                 Returns the data buffer size established in Init.
  1036.  
  1037. GetData         Procedure GetData(var Rec); Virtual;
  1038.  
  1039.                 Returns a TbxBufData record with a pointer to the data buffer
  1040.                 and the data buffer size
  1041.  
  1042. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  1043.  
  1044.                 Handles the messages cmUpdateView, cmEditView, cmCursorMoved
  1045.                 to keep both views up to date.
  1046.  
  1047. SetData         Procedure SetData(var Rec); Virtual;
  1048.  
  1049.                 Accepts a TbxBufData record with a pointer to the data buffer
  1050.                 and the data buffer size. Resets the modified flag, zeros the
  1051.                 position indicator, and updates both views,
  1052.  
  1053. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  1054.  
  1055.                 Keeps the position indicator state in sync with the rest of
  1056.                 the view.
  1057.  
  1058. SizeLimits    Procedure SizeLimits(var Min, Max: TPoint); Virtual;
  1059.  
  1060.                 Overrides the standard SizeLimits to keep the X dimension
  1061.                 from changing.
  1062.  
  1063. Store           Procedure Store(var S: TStream);
  1064.  
  1065.                 Writes the object to stream S. Keep in mind that the data
  1066.                 buffer is not stored on the stream.
  1067. See also    TbxAsciiBuff, TbxEditbuff, TbxHexBuff, TWindow
  1068.  
  1069. TbxBufData type                                                 TvViews
  1070. ──────────────────────────────────────────────────────────────────────────────
  1071. Declaration
  1072.                 TBufData = record
  1073.                     Data    : Pointer;
  1074.                     DataSize: Word;
  1075.                 end;
  1076. Function        Record used with SetData and GetData methods of
  1077.                 TbxFormattedTextScroller, TbxEditBuff, and TbxASCIIHexEditor.
  1078. See also    TbxASCIIHexEditor, TbxEditBuff, TbxFormattedTextScroller
  1079.  
  1080. TbxBusyWindow (TWindow)                                         TvApp
  1081. ──────────────────────────────────────────────────────────────────────────────
  1082.                 The TbxBusyWindow provides a way of displaying a "Working.."
  1083.                 or other message to the user during disk activity, etc.
  1084.  
  1085. Methods ───────────────────────────────────────────────────────────────────
  1086. Init            Constructor Init(const AMessage: String);
  1087.  
  1088.                 Constructs a TbxBusyWindow  large enough to display the text
  1089.                 in AMessage. Text should be one line only.
  1090.  
  1091. GetPalette    Function GetPalette: PPalette; Virtual;
  1092.  
  1093.                 Returns a pointer to the default palette CBusyWindow.
  1094.  
  1095. Show            Procedure Show; Virtual;
  1096.  
  1097.                 Displays the window and forces it to top of the desktop
  1098.                 display.
  1099. See also    TbxApplication, TWindow
  1100.  
  1101. TbxByteArray type                                               TvType
  1102. ──────────────────────────────────────────────────────────────────────────────
  1103. Declaration    TbxByteArray = Array[0..$FFE0] of Byte;
  1104. Function    Provide a large byte array.
  1105. See also    TbxCharArray
  1106.  
  1107. TbxByteEdit (TbxLongEdit)                                       TvInput
  1108. ──────────────────────────────────────────────────────────────────────────────
  1109.                 Implements an edit control for Byte variables.
  1110.  
  1111. Methods ───────────────────────────────────────────────────────────────────
  1112. Init            Constructor Init(var Bounds: TRect; const AMask: String;
  1113.                                  AMin: Byte; AMax: Byte);
  1114.  
  1115.                 The Init constructor exists mainly to provide range checking
  1116.                 of the AMin and AMax parameters. Calls the TbxLongEdit.Init
  1117.                 constructor. AMask defines a picture that controls what
  1118.                 characters may be entered. AMask can contain literal
  1119.                 characters as well as digit place holders.  Two characters
  1120.                 can be used for indicating digits, '#' and '9'. The '9'
  1121.                 allows the digits 0 through 9, while the '#' also allows a
  1122.                 minus sign to be entered.
  1123.  
  1124. DataSize    Function DataSize: Word; Virtual;
  1125.  
  1126.                 Returns the size of a Byte.
  1127.  
  1128. GetData         Procedure GetData(var Rec); Virtual;
  1129.  
  1130.                 Returns the current value as a Byte in Rec.
  1131.  
  1132. SetData         Procedure SetData(var Rec); Virtual;
  1133.  
  1134.                 Interprets the data in Rec as a Byte.
  1135. See also    TbxEditLine, TInputLine, TbxLongEdit, TbxNumericEdit
  1136.  
  1137. TbxCharArray type                                               TvType
  1138. ──────────────────────────────────────────────────────────────────────────────
  1139. Declaration    TbxCharArray = Array[0..$FFE0] of Char;
  1140. Function    Provide a large character array.
  1141. See also    TbxByteArray
  1142.  
  1143. TbxCharSet type                                                 TvType
  1144. ──────────────────────────────────────────────────────────────────────────────
  1145. Declaration    TbxCharSet = Set of Char;
  1146. Function    Defines a character set type.
  1147.  
  1148. TbxCheckBoxes (TCheckBoxes)                                     TvInput
  1149. ──────────────────────────────────────────────────────────────────────────────
  1150.                 TbxCheckBoxes are here so all data entry objects can have
  1151.                 field locking and error checking. All other functionality is
  1152.                 identical to the normal check box.
  1153.  
  1154. Fields ────────────────────────────────────────────────────────────────────
  1155. ID              ID : Word;
  1156.  
  1157.                 Currently assigned id number. Id numbers are assigned
  1158.                 automatically by TbxEntryDialog.Insert. Id numbers must be
  1159.                 unique.
  1160.  
  1161. LLabel          LLabel : PLabel;
  1162.  
  1163.                 Pointer to the label associated with the check boxes.
  1164.  
  1165. EditFlags    EditFlags : Word;
  1166.  
  1167.                 Holds the dfXXX flags used to control editing and formatting
  1168.                 options. Only the dfRequired flag has any effect on check
  1169.                 boxes.
  1170.  
  1171. Methods ───────────────────────────────────────────────────────────────────
  1172. Init            Constructor Init(var Bounds: TRect; AStrings: PSItem);
  1173.                 Creates a set of check boxes with the given bounds by calling
  1174.                 TCheckBoxes.Init. Sets the ID and EditFlags to zero, and
  1175.                 LLabel to nil. Sets the EventMask to include broadcast
  1176.                 events.
  1177.  
  1178. Load            Constructor Load(var S: TStream);
  1179. AddLabel    Procedure AddLabel(ALabel: PLabel);
  1180.  
  1181.                 Associates a label with the control. All labels should be
  1182.                 attached to their corresponding controls so that when the
  1183.                 control is locked the label can be locked too. Label text
  1184.                 will be used to construct the default error messages.
  1185.  
  1186. Empty           Function Empty: Boolean; Virtual;
  1187.  
  1188.                 Returns True if no boxes are checked. Empty is used when
  1189.                 validating a required field.
  1190.  
  1191. GetID           Function GetID: Word;
  1192.  
  1193.                 Returns the ID number assigned to the object. ID numbers are
  1194.                 used by TbxEntryDialog to locate a specific control in the
  1195.                 dialog box and return a pointer to it.
  1196.  
  1197.                 ID numbers are useful for dialogs stored on streams. Field ID
  1198.                 numbers will remain constant when the dialog is loaded from a
  1199.                 stream, where as any pointers to the object will change.
  1200.  
  1201. GetFieldName    Function GetFieldName: String; Virtual;
  1202.  
  1203.                 Used to get the field name displayed with error messages. By
  1204.                 default it returns the text in the label pointed to by
  1205.                 LLabel. If LLabel is nil a null string is returned.
  1206.  
  1207. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  1208.  
  1209.                 Calls the inherited HandleEvent then processes any cmSetId or
  1210.                 cmIdentify commands. cmSetId commands are issued by
  1211.                 TbxEntryDialog to set the ID of an object. CmIdentify
  1212.                 commands cause the object to return a pointer to itself.
  1213.  
  1214. Lock            Procedure Lock;
  1215.  
  1216.                 Locks the field and label by setting sfDisabled in the State
  1217.                 flags.
  1218.  
  1219. SetEditFlag    Procedure SetEditFlag(AFlag: Word; Enable: Boolean);
  1220.  
  1221.                 Sets the EditFlags for the check box. Only the dfRequired
  1222.                 flag has any effect on check boxes.
  1223.  
  1224. SetID           Procedure SetID(AFieldID: Word);
  1225.  
  1226.                 Sets ID to AFieldID.
  1227.  
  1228. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  1229.  
  1230.                 Calls the inherited SetState, then, if AState contains
  1231.                 sfDisabled, calls the LLabel^.SetState with sfDisabled and
  1232.                 the value in the Enable parameter.
  1233.  
  1234. Store           Procedure Store(var S: TStream);
  1235. UnLock          Procedure UnLock;
  1236.  
  1237.                 Unlocks the field and label by clearing sfDisabled in the
  1238.                 State flags.
  1239.  
  1240. Valid           Function Valid(Command: Word): Boolean; Virtual;
  1241.  
  1242.                 If the field is required and the Empty method returns True,
  1243.                 Valid generates a cmFieldError event and returns False. If
  1244.                 the field is not required Valid returns the value received
  1245.                 from the inherited Valid function.
  1246. See also        TbxEntryDialog, TCheckBoxes
  1247.  
  1248. TbxCheckListBox (TbxListBox)                                    TvDialog
  1249. ──────────────────────────────────────────────────────────────────────────────
  1250.                 TbxCheckListBox is a list box that allows selection of
  1251.                 multiple items in a list. List items are proceeded by a "[ ]"
  1252.                 or "[X]", depending on their "Selected" state. If a list
  1253.                 contains 256 or fewer items, you may use the SetSelectSet and
  1254.                 GetSelectSet methods to select a set of items or get a set of
  1255.                 all the selected items.  Alternately, you may use SelectItem
  1256.                 and IsSelected to set or check the "Selected" state of a
  1257.                 single item. Remember that collections are numbered starting
  1258.                 from zero.  TbxCheckListBox is derived from TbxListBox so its
  1259.                 collection must be a TbxCollection of TbxObjects (or
  1260.                 descendants). You can't override GetText and use a string
  1261.                 collection because the collection items need a Boolean
  1262.                 "Selected" field.
  1263.  
  1264. Methods ───────────────────────────────────────────────────────────────────
  1265. GetSelectSet    Procedure GetSelectSet(var ASet: TbxByteSet);
  1266.  
  1267.                 If there are 256 or fewer items in the list, GetSelectSet is
  1268.                 the easiest way to find the selected items. Each item that is
  1269.                 selected in the list box will have a corresponding item
  1270.                 returned in ASet. Collection items are indexed from zero.
  1271.  
  1272. GetText         Function GetText(Item: Integer;
  1273.                                  MaxLen: Integer): String; Virtual;
  1274.  
  1275.                 Builds the lines for the list box. Takes the text returned by
  1276.                 the item's GetText method and appends a '[X]" or "[ ]"
  1277.                 depending on the value return by the item's GetSelect method.
  1278.  
  1279. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  1280.  
  1281.                 Checks for mouse presses in the list and toggles the
  1282.                 "selected" state of the item under the mouse cursor.
  1283.  
  1284. IsSelected    Function IsSelected(Item: Integer): Boolean; Virtual;
  1285.  
  1286.                 Returns the "selected" state of the item at the position
  1287.                 of Item in the list box.
  1288.  
  1289. SelectItem    Procedure SelectItem(Item: Integer); Virtual;
  1290.  
  1291.                 Sets the "selected" state of the item at position Item in the
  1292.                 list to True. Redraws the list box.
  1293.  
  1294. SetSelectSet    Procedure SetSelectSet(ASet: TbxByteSet);
  1295.  
  1296.                 When the size of the list is 256 or less, you can use
  1297.                 SetSelectSet to set multiple items in the list to "selected".
  1298.                 For example the set [1..3, 10, 20] will check the items 2 to
  1299.                 4 and items 11 and 21 in the list. Remember that collections
  1300.                 are numbered from zero.
  1301. See also    TbxListBox, TListBox
  1302.  
  1303. TbxCollection (TSortedCollection)                               TvObjects
  1304. ──────────────────────────────────────────────────────────────────────────────
  1305.                 TbxCollection is a sorted collection of TbxObjects for use in
  1306.                 a TbxListBox.
  1307.  
  1308. Methods ───────────────────────────────────────────────────────────────────
  1309. Compare    Function Compare(Key1, Key2: Pointer): Integer; Virtual;
  1310.  
  1311.                 Compares the objects by comparing the text returned by each
  1312.                 object's GetText method.
  1313. See also    TbxCollection, TbxObject, TObject
  1314.  
  1315. TbxDate (TObject)                                               TvType
  1316. ──────────────────────────────────────────────────────────────────────────────
  1317.                 TbxDate object encapsulates a date with method for comparing,
  1318.                 validating and formatting dates.
  1319.  
  1320. Fields ────────────────────────────────────────────────────────────────────
  1321. Day             Day : Byte;
  1322. Month           Month : Byte;
  1323. Year            Year : Word;
  1324.  
  1325. Methods ───────────────────────────────────────────────────────────────────
  1326. Init            Constructor Init(D : Byte; M : Byte; Y : Word);
  1327.  
  1328.                 Sets Year to Y, Month to M, and Day to D.
  1329.  
  1330. Load            Constructor Load(var S : TStream);
  1331. Compare         Function Compare(var ADate: PbxDate): Integer;
  1332.  
  1333.                 Returns 1 if the date is greater than ADate, 0 if the date and
  1334.                 ADate are equal, and -1 if the date is less than ADate.
  1335.  
  1336. DateString    Function DateString(Picture: TbxDateSt): TbxDateSt;
  1337.  
  1338.                 Returns the date as string based on the format in Picture.
  1339.                 The characters 'D', 'd',  'M', 'm', 'Y', and 'y' detail the
  1340.                 positions of day, month, and year in the date string. Any '/'
  1341.                 characters are replaced by the character in the global
  1342.                 constant DateSlash. Any unused uppercase format characters
  1343.                 are replaced by spaces, and unused lowercase format
  1344.                 characters are replaced by zeros.  The day, month, and year
  1345.                 specifiers can appear in any position in the picture.
  1346.  
  1347.                 The picture "MM/DD/YY" might return a date such as " 4/
  1348.                 4/93", while the picture "mm/dd/yy" would return a string
  1349.                 like "04/04/93". The strings "MMDDYY" and "mm/dd/yyyy" would
  1350.                 return " 4 493" and "04/04/1993" respectively.
  1351.  
  1352. DaysInMonth    Function DaysInMonth: Word;
  1353.  
  1354.                 Returns the number of days in the month for the current date
  1355.                 values.
  1356.  
  1357. ExtractDate    Procedure ExtractDate(Picture: TbxDateSt; ADateSt: TbxDateSt);
  1358.  
  1359.                 Extracts the values for the date from ADateSt based on the
  1360.                 format supplied in Picture. Picture uses the same formatting
  1361.                 characters as the DateString  method.
  1362.  
  1363. GetData         Procedure GetData(var Rec);
  1364.  
  1365.                 Returns the Day, Month, Year values in a TbxDateRec record.
  1366.  
  1367. GetDay          Function GetDay: Byte;
  1368.  
  1369.                 Returns the current value of Day.
  1370.  
  1371. GetMonth    Function GetMonth: Byte;
  1372.  
  1373.                 Returns the current value of Month.
  1374.  
  1375. GetYear         Function GetYear: Word;
  1376.  
  1377.                 Returns the current value of Year.
  1378.  
  1379. LeapYear    Function LeapYear: Boolean;
  1380.  
  1381.                 Returns True if the value in Year is a leap year.
  1382.  
  1383. SetData         Procedure SetData(var Rec);
  1384.  
  1385.                 Sets the Day, Month, Year from a TbxDateRec record.
  1386.  
  1387. SetDay          Procedure SetDay(D : Byte);
  1388.  
  1389.                 Sets the Day to D.
  1390.  
  1391. SetMonth    Procedure SetMonth(M : Byte);
  1392.  
  1393.                 Sets the Month to M.
  1394.  
  1395. SetToday    Procedure SetToday;
  1396.  
  1397.                 Sets Day, Month, Year from the current system date.
  1398.  
  1399. SetYear         Procedure SetYear(Y : Word);
  1400.  
  1401.                 Sets the Year to Y.
  1402.  
  1403. Store           Procedure  Store(var S : TStream);
  1404. Valid           Function Valid: Boolean; Virtual;
  1405.  
  1406.                 Returns True if the date values specify a valid date. Checks
  1407.                 the month, day, and year values and accounts for leap years.
  1408. See also    TbxDate, TbxDateEdit, TbxDateRec
  1409.  
  1410. TbxDateEdit (TbxEditLine)                                       TvInput
  1411. ──────────────────────────────────────────────────────────────────────────────
  1412.                 Implements an input line for formatted dates. On entry
  1413.                 TbxDateEdit will fill in any missing data if the dfDefaults
  1414.                 bit in EditFlags is set. The default date values can be set
  1415.                 manually or by calling SetDateDefaults once when you start
  1416.                 your program.
  1417.  
  1418. Fields ────────────────────────────────────────────────────────────────────
  1419. Date            Date : PbxDate;
  1420.  
  1421.                 Holds a pointer to an object with the current date values.
  1422.  
  1423. DatePic         DatePic : TbxDateSt;
  1424.  
  1425.                 Holds the edit mask specified in Init.
  1426.  
  1427. Methods ───────────────────────────────────────────────────────────────────
  1428. Init            Constructor Init(var Bounds: TRect; ADatePic: TbxDateSt);
  1429.  
  1430.                 Calls TbxEditLine.Init to create a formatted input line.
  1431.                 ADatePic is stored in the DatePic field.
  1432.  
  1433.                 In ADatePic the characters 'm', M', 'd', 'D', 'y', 'Y' are
  1434.                 used to specify the positions of the day, month, and year in
  1435.                 the input string. The only editable characters in the input
  1436.                 line will be in the positions indicated by the m', 'M', 'd',
  1437.                 'D', 'y', 'Y' characters.  ADatePic might look like
  1438.                 "MM/DD/YY", "mm/dd/yyyy", or "dd/mm/yy", etc. ADatePic will
  1439.                 be used to extract the day, month, and year from the correct
  1440.                 positions in the string when the field is validated or the
  1441.                 data returned from the SetData method .
  1442.  
  1443. Load            Constructor Load(var S: TStream)
  1444.  
  1445. Done            Destructor Done; Virtual;
  1446.  
  1447.                 Disposes of Date then calls the inherited Done.
  1448.  
  1449. DataSize    Function DataSize: Word; Virtual;
  1450.  
  1451.                 Returns the size of a TbxDateRec.
  1452.  
  1453. GetData         Procedure GetData(var Rec); Virtual;
  1454.  
  1455.                 Returns the current date values in a TbxDateRec. Uses
  1456.                 DatePic to extract the values from the entry string.
  1457.  
  1458. SetData         Procedure SetData(var Rec); Virtual;
  1459.  
  1460.                 Sets the current date values. Rec must be a TbxDateRec.
  1461.  
  1462. Store           Procedure Store(var S: TStream);
  1463. Valid           Function Valid(Command : Word): Boolean; Virtual;
  1464.  
  1465.                 Uses DatePic to extract the day, month, and year from the
  1466.                 string input. If dfDefaults flag in EditFlags is True, Valid
  1467.                 will fill in any missing data with the default values from
  1468.                 DefautlDay, DefaultMonth, or DefaultYear. After any default
  1469.                 data is filled, the date is validated.
  1470.  
  1471.                 If the date is not valid, Valid will generate a cmFieldError
  1472.                 event. The InfoPtr field of the event will contain a pointer
  1473.                 to an error message for display.
  1474.  
  1475. See also    TbxDate, TbxDateRec, TbxEditLine
  1476.  
  1477. TbxDateRec type                                                 TvType
  1478. ──────────────────────────────────────────────────────────────────────────────
  1479. Declaration    TbxDateRec  = record
  1480.                         Day : Byte;
  1481.                         Month : Byte;
  1482.                         Year : Word;
  1483.                 end;
  1484. Function        This is the data record used for TbxDate and TbxDateEdit
  1485.                 GetData and SetData.
  1486. See also    TbxDate, TbxDateEdit
  1487.  
  1488. TbxDateSt type                                                  TvType
  1489. ──────────────────────────────────────────────────────────────────────────────
  1490. Declaration    TbxDateSt = String[12];
  1491. Function        Used as the string type for date format masks and date
  1492.                 strings. Date format masks look like "mm/dd/yyyy" or
  1493.                 "dd/mm/yy", etc.
  1494. See also    TbxDate, TbxDateEdit
  1495.  
  1496. TbxDoubleEdit (TbxFloatEdit)                                    TvInput
  1497. ──────────────────────────────────────────────────────────────────────────────
  1498.                 TbxDoubleEdit is only available if the N+ compilation
  1499.                 directive is set.
  1500.  
  1501. Fields ────────────────────────────────────────────────────────────────────
  1502. Min             Min : Double;
  1503.  
  1504.                 The smallest number that is a valid entry.
  1505.  
  1506. Max             Max : Double;
  1507.  
  1508.                 The largest number that is a valid entry.
  1509.  
  1510. Methods ───────────────────────────────────────────────────────────────────
  1511. Init            Constructor Init(var Bounds: TRect; const AMask: String;
  1512.                                  AMin: Double; AMax: Double);
  1513.  
  1514.                 Calls the inherited Init then set sets Min and Max. AMask
  1515.                 defines a picture that controls what characters may be
  1516.                 entered.  AMask can contain literals as well as number digit
  1517.                 place holders. Two characters can be used for indicating
  1518.                 digits, '#' and '9'. The '9' allows the entry of the digits
  1519.                 0 through 9, while the '#' also allows entry of a minus sign.
  1520.                 If a decimal point (as defined in the DecimalPt constant)
  1521.                 appears in the edit mask, the user may enter a decimal point
  1522.                 in the number.
  1523.  
  1524. Load            Constructor Load(var S: TStream);
  1525. DataSize    Function DataSize: Word; Virtual;
  1526.  
  1527.                 Returns the size of a Double.
  1528.  
  1529. GetData         Procedure GetData(var Rec); Virtual;
  1530.  
  1531.                 Returns the current value as a Double in Rec.
  1532.  
  1533. OutOfRange    Function OutOfRange: Boolean; Virtual;
  1534.  
  1535.                 Tests the current value to see if it is in range. If Min or
  1536.                 Max is not zero, OutOfRange returns True if the entered value
  1537.                 is not in the range Min to Max inclusive.
  1538.  
  1539. OutOfRangeMsg    Function OutOfRangeMsg: String; Virtual;
  1540.  
  1541.                 Returns the error message displayed for out of range errors.
  1542.  
  1543. SetData         Procedure SetData(var Rec); Virtual;
  1544.  
  1545.                 Sets the current value from the Double type variable in Rec.
  1546.  
  1547. Store           Procedure Store(var S: TStream);
  1548. See also        TbxEditLine, TbxFloatEdit, TbxNumericEdit, TbxRealEdit,
  1549.                 EditMask characters
  1550.  
  1551. TbxEditBuff (TScroller)                                         TvViews
  1552. ──────────────────────────────────────────────────────────────────────────────
  1553.                 TbxEditBuff is an editable TScroller. It is the base object
  1554.                 for the hex and ascii edit buffers used with the
  1555.                 TbxEditBuffWindow.
  1556.  
  1557. Fields ────────────────────────────────────────────────────────────────────
  1558. Buf             Buf : PbxByteArray;
  1559.  
  1560.                 Pointer to raw data buffer supplied to the object.
  1561.  
  1562. BufSize         BufSize : Word;
  1563.  
  1564.                 Size of the memory block pointed to by Buf,
  1565.  
  1566. ItemSize    ItemSize : Byte;
  1567.  
  1568.                 The display size of each character in the buffer.
  1569.  
  1570. Methods ───────────────────────────────────────────────────────────────────
  1571. Init            Constructor Init(Bounds: TRect; Buff: Pointer;
  1572.                                  BuffSize: Word; ItemWidth: Byte;
  1573.                                  AVScrollBar: PScrollBar);
  1574.                 After calling the inherited constructor, Init turns on the
  1575.                 ofFramed bit in Options and displays a block cursor. Buff is
  1576.                 a pointer to the data being edited. BuffSize is the size of
  1577.                 Buff. ItemWidth is the display width of each character.
  1578.                 ItemWidth is used to calculate the number of rows in the
  1579.                 display and the physical offset in the buffer. An ascii
  1580.                 display would have an item width of one, while a hexadecimal
  1581.                 display would have an item width of two per character.
  1582.  
  1583. Load            Constructor Load(var S: TStream);
  1584.  
  1585.                 Loads the object from stream S. The buffer pointer is set to
  1586.                 nil and the buffer size is set to zero. The buffer and buffer
  1587.                 size must be set by calling SetData.
  1588.  
  1589. DataSize    Function DataSize: Word; Virtual;
  1590.  
  1591.                 Returns the size of a TbxBufData record.
  1592.  
  1593. GetData         Procedure GetData(var Rec); Virtual;
  1594.  
  1595.                 Returns a pointer to the buffer and buffer size in a
  1596.                 TbxBufData record.
  1597.  
  1598. GetOffset    Function GetOffset: Word;
  1599.  
  1600.                 Returns the position of the cursor in the buffer.
  1601.  
  1602. GetXY           Procedure GetXY(var Pos: TPoint);
  1603.  
  1604.                 Returns the X,Y coordinates of the cursor in the view. GetXY
  1605.                 returns the logical X,Y based on the item size.
  1606.  
  1607. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  1608.  
  1609.                 Mainly handles cursor movement in the view. Actual editing is
  1610.                 left to descendant views to process. Processes page up, page
  1611.                 down, arrow keys, ctrl-page up, ctrl-page down, mouse presses
  1612.                 and scroll bar messages
  1613.  
  1614. SetData         Procedure SetData(var Rec);Virtual;
  1615.  
  1616.                 Set the data buffer pointer and data buffer size. Expects Rec
  1617.                 to be a TbxBufData record.  Calculates the maximum number of
  1618.                 display rows. Resets the view positioning to the top of the
  1619.                 buffer.
  1620.  
  1621. SetXY           Procedure SetXY(Pos: TPoint);
  1622.  
  1623.                 Sets the position of the cursor in the view. Pos is the
  1624.                 logical position and will be translated to the physical
  1625.                 position by multiplying X by ItemWidth.
  1626.  
  1627. Store           Procedure Store(var S: TStream);
  1628.  
  1629.                 Write the object to a stream. The data buffer is not saved.
  1630. See also    TbxAsciiBuff, TbxAsciiHexEditor, TbxHexBuff, TScroller
  1631.  
  1632. TbxEditLine (TInputLine)                                        TvInput
  1633. ──────────────────────────────────────────────────────────────────────────────
  1634.                 This is the base input line for all the new data entry
  1635.                 objects. When you pass an edit mask MaxLen is calculated
  1636.                 automatically.  Only the characters in the set associated
  1637.                 with a particular edit mask character will be accepted as
  1638.                 valid input. You may mix different mask characters in the
  1639.                 edit mask. An edit mask may contain literal characters that
  1640.                 cannot be edited.  Literals allow you to create inputlines
  1641.                 for entering information like dates and phone numbers.
  1642.  
  1643. Fields ────────────────────────────────────────────────────────────────────
  1644. PadChar         PadChar : Char;
  1645.  
  1646.                 This is the character displayed at all editable positions in
  1647.                 the input line. It defaults to a space.
  1648.  
  1649. XPos            XPos : Byte;
  1650.  
  1651.                 Next character insert position in the data.
  1652.  
  1653. First           First : Byte;
  1654.  
  1655.                 First editable position (non-literal mask character) in the
  1656.                 line.
  1657.  
  1658. Mask            Mask : PString;
  1659.  
  1660.                 A pointer to the edit mask for the input line. The user
  1661.                 entered data and the edit mask are stored in separate
  1662.                 strings.
  1663.  
  1664. ID              ID : Word;
  1665.  
  1666.                 A unique ID number for the input line. ID numbers are
  1667.                 assigned by automatically by TbxEntryDialog.Insert.
  1668.  
  1669. LLabel          LLabel : PLabel;
  1670.  
  1671.                 Pointer to the label attached to the input line.
  1672.  
  1673. EditFlags    EditFlags : Word;
  1674.  
  1675.                 A combination of the various dfXXXX flags such as dfRequired,
  1676.                 dfHide that control special editing capabilities.
  1677.  
  1678. Methods ───────────────────────────────────────────────────────────────────
  1679. Init            Constructor Init(var Bounds: TRect; const AMask : String);
  1680.  
  1681.                 Calculates the number of actual editable characters in AMask
  1682.                 then calls TInputLine.Init. AMask controls many of the
  1683.                 features of a TbxEditLine, because it supplies the editing
  1684.                 mask for the object.
  1685.  
  1686.                 At each position in the edit mask, only those characters in
  1687.                 the valid set associated with a particular edit mask
  1688.                 character will be accepted as input. You may mix different
  1689.                 mask characters in the edit mask. AMask may contain literal
  1690.                 characters that cannot be edited. Literals allow you to
  1691.                 create input liness for entering information like dates and
  1692.                 phone numbers. As an example, "$9999.99" would be a good
  1693.                 mask for dollar amounts. The mask "(999) 999-9999 ext 999"
  1694.                 would allow for full phone numbers with extension.
  1695.  
  1696.                 The valid mask characters are listed below
  1697.  
  1698.                 Character       Function
  1699.                 X               Any character.
  1700.                 U               Any character, force upper case
  1701.                 L               Any character, force lower case
  1702.                 a               Alpha numeric only
  1703.                 u               Alpha numeric only, force upper case
  1704.                 l               Alpha numeric only, force lower case
  1705.                 #               Numbers, minus
  1706.                 9               Numbers only
  1707.                 &               Hexadecimal numbers
  1708.                 @               Dates  (internal use only)
  1709.  
  1710. Load            Constructor Load(var S: TStream);
  1711. Done            Destructor Done; Virtual;
  1712.  
  1713.                 Disposes of the edit mask string, then calls the inherited
  1714.                 Done.
  1715.  
  1716. AddLabel    Procedure AddLabel(ALabel : PLabel);
  1717.  
  1718.                 Associates a label with the input line. When a label is
  1719.                 added, its text will be used to construct the default error
  1720.                 messages. If the input line is locked (disabled) any
  1721.                 associated label will also be locked.
  1722.  
  1723. DataSize    Function DataSize: Word; Virtual;
  1724.  
  1725.                 Returns the size of the edit mask string, which is the size
  1726.                 of the data string returned by GetData.
  1727.  
  1728. Draw            Procedure Draw; Virtual;
  1729.  
  1730.                 Merges the user entered data string with the edit mask and
  1731.                 displays the result.
  1732.  
  1733. EditToMaskPos    Function EditToMaskPos(Pos : Integer): Integer;
  1734.  
  1735.                 Converts a position in the edit mask to a position in the
  1736.                 data string.
  1737.  
  1738. Empty           Function Empty: Boolean; Virtual;
  1739.  
  1740.                 Returns True if the input line is empty. By default it
  1741.                 returns True if the input data string is null.
  1742.  
  1743. GetData         Procedure GetData(var Rec); Virtual;
  1744.  
  1745.                 Merges the input data string with the edit mask, replacing
  1746.                 any unused edit mask characters with PadChar, and returns the
  1747.                 result.
  1748.  
  1749. GetFieldName    Procedure GetFieldName: String; Virtual;
  1750.  
  1751.                 Returns the name to display in any error messages. By default
  1752.                 GetFieldName returns the text in the label attached to the
  1753.                 input line.
  1754.  
  1755. GetID           Function GetID: Word;
  1756.  
  1757.                 Returns the ID assigned to the input line. If the input line
  1758.                 is inserted into a TbxEntryDialog unique ID numbers will be
  1759.                 assigned automatically. When using a TbxEntryDialog, ID
  1760.                 numbers can be used to get a pointer to the input line.
  1761.  
  1762.                 ID numbers are useful for dialogs stored on streams. ID
  1763.                 numbers will remain constant when the dialog is loaded from a
  1764.                 stream, where as any pointers to the input line will change.
  1765.  
  1766. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  1767.  
  1768.                 HandleEvent is the most complex method of a TbxInputLine. It
  1769.                 has all the standard functionality of a normal TInputLine,
  1770.                 including scrolling and block marking. But it also processes
  1771.                 the input events according to the edit mask.
  1772.  
  1773.                 Each time a key is pressed the current edit mask character is
  1774.                 checked. Only those characters in the valid entry set
  1775.                 associated with the current mask character are allowed as
  1776.                 valid entry. In addition, HandleEvent skips over an non-mask
  1777.                 literal characters in the edit mask.
  1778.  
  1779. HomePos         Function HomePos: Integer; Virtual;
  1780.  
  1781.                 Returns the home position of the cursor. The cursor moves to
  1782.                 this position in the line when a kbHome event is processed by
  1783.                 HandleEvent.
  1784.  
  1785. InsertChar    Procedure InsertChar(Ch: Char); Virtual;
  1786.  
  1787.                 Inserts Ch into the line at the current cursor position.
  1788.  
  1789. MaskToEditPos    Function MaskToEditPos(Pos : Integer): Integer;
  1790.  
  1791.                 Converts a position in the input data to a position in the
  1792.                 edit mask.
  1793.  
  1794. Lock            Procedure Lock;
  1795.  
  1796.                 Disables the input line and label.
  1797.  
  1798. Merge           Procedure Merge(var St: String; Justify: Boolean); Virtual;
  1799.  
  1800.                 Merges the input data into the edit mask. Pads the data as
  1801.                 needed with PadChar to fill the edit mask. If Justify is
  1802.                 True, the line will be right or left justified as indicated
  1803.                 by the edit flags.
  1804.  
  1805. NextPos         Function NextPos(Pos: Integer): Integer; Virtual;
  1806.  
  1807.                 Returns the position of the next editable character in the
  1808.                 edit mask.
  1809.  
  1810. PrevPos         Function PrevPos(Pos: Integer): Integer; Virtual;
  1811.  
  1812.                 Returns the position of the first preceding editable
  1813.                 character in the edit mask.
  1814.  
  1815. Remove          Function Remove(const St: String): String;
  1816.  
  1817.                 Extracts the data string from the a merged data and edit mask
  1818.                 strings.
  1819.  
  1820. SetData         Procedure SetData(var Rec); Virtual;
  1821.  
  1822.                 Set the data for the input line. Expects the data to be the
  1823.                 same as returned by GetData. This means the string is merged
  1824.                 with the edit mask, so that the literal characters are
  1825.                 included, and it is exactly as it will appear when displayed
  1826.                 in the input line on screen.
  1827.  
  1828. SetEditFlag    Procedure SetEditFlag(AFlag: Word; Enable: Boolean); Virtual;
  1829.  
  1830.                 Sets the bits in the EditFlag field. Works like the SetState
  1831.                 procedure expects it toggles bits in EditFlag.
  1832.  
  1833. SetID           Procedure SetID(AFieldID: Word);
  1834.  
  1835.                 Sets ID to AFieldID.
  1836.  
  1837. SetState    Procedure SetState(AState: Word; Enable: Boolean);  Virtual;
  1838.  
  1839.                 Sets the State flag for the input line. If AState contains
  1840.                 the flag sfDisabled, the sfDisabled flag of the label is also
  1841.                 set .
  1842.  
  1843. Store           Procedure Store(var S: TStream);
  1844. UnLock          Procedure UnLock;
  1845.  
  1846.                 Unlocks the input line and label.
  1847.  
  1848. Valid           Function Valid(Command : Word): Boolean; Virtual;
  1849.  
  1850.                 If the dfRequired flag is set, the input line is checked to
  1851.                 make sure it is not empty. If it is empty the field name is
  1852.                 acquired by calling GetFieldName. An error message with the
  1853.                 field name is created and inserted into the InfoPtr field of
  1854.                 a cmFieldError event that is sent to the owner view.
  1855.  
  1856.                 Any dialogs that have a TbxEditLine or descendant inserted
  1857.                 into them should be able to respond to cmFieldError broadcast
  1858.                 events. Valid will insert a pointer to the error message in
  1859.                 the InfoPtr field of the TEvent record of the cmFieldError
  1860.                 event. TbxEntryDialog type displays any error messages by
  1861.                 calling the MessageBox function in STDDLG.PAS.
  1862. See also        TbxEntryDialog, TInputLine
  1863.  
  1864. TbxEntryDialog (TDialog)                                        TvInput
  1865. ──────────────────────────────────────────────────────────────────────────────
  1866.                 This descendant of TDialog is designed to work with
  1867.                 TbxEditLine, TbxCheckBoxes, TbxRadioButtons, TbxSpinBars,
  1868.                 etc. and their descendants. It will automatically assign a
  1869.                 unique ID number to each control inserted into it. ID
  1870.                 numbers allow you to lock and unlock controls on the fly.
  1871.                 TbxEntryDialog also contains code for displaying field error
  1872.                 messages.
  1873.  
  1874. Fields ────────────────────────────────────────────────────────────────────
  1875. NextId          NextId : Word;
  1876.  
  1877.                 The next valid ID number. Incremented each time a control
  1878.                 with an ID number field is inserted
  1879.  
  1880. Methods ───────────────────────────────────────────────────────────────────
  1881. Init            Constructor Init(var Bounds: TRect; ATitle: TTitleStr);
  1882.  
  1883.                 Initializes NextId to zero and sets the EventMask to include
  1884.                 broadcast messages.
  1885.  
  1886. Load            Constructor Load(var S: TStream);
  1887. FindField    Function FindField(ID: Word): Pointer;
  1888.  
  1889.                 Returns a pointer to the dialog control that has an ID
  1890.                 matching the ID parameter. Returns nil if no object with a
  1891.                 matching ID is found.
  1892.  
  1893. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  1894.  
  1895.                 Adds functionality to handle cmFieldError messages broadcast
  1896.                 by child views. When a cmFieldError is processed, the string
  1897.                 pointed to by the TEvent.InfoPtr field is displayed by
  1898.                 calling the standard Turbo Vision MessageBox function.
  1899.  
  1900. Insert          Procedure Insert(P : PView); Virtual;
  1901.  
  1902.                 Adds the view to the dialog box and assigns a unique ID
  1903.                 number. ID numbers start at 1 and are assigned sequentially
  1904.                 to all TbxEditLines and descendants or any view that can
  1905.                 respond to cmSetId commands, such as TbxCheckBoxes or
  1906.                 TbxSpinBars.
  1907.  
  1908. LockField    Procedure LockField(ID: Word; Enable: Boolean);
  1909.  
  1910.                 Locks or unlocks a control, and any attached label. ID
  1911.                 specifies the ID number assigned to the control. Enable is
  1912.                 the locking mode.
  1913.  
  1914. Store           Procedure Store(var S : TStream);
  1915. See also    TbxEditLine, TDialog
  1916.  
  1917. TbxFileDialog (TFileDialog)                                     TvDialog
  1918.                 TbxFileDialog is a new file list dialog that implements a
  1919.                 look that is much closer to the Microsoft Windows file
  1920.                 dialog. It displays directories and drives in a separate
  1921.                 window from the files list. TbxFileDialog also has a display
  1922.                 line that shows the statistics for the current file. Any file
  1923.                 that is opened with a double click in the file list will be
  1924.                 added to the file history box, unlike the normal TFileDialog.
  1925.  
  1926.                 There are two source code changes that must be made to the
  1927.                 file STDDLG.PAS. Please see the notes in the source in the
  1928.                 file TVDIALOG.PAS.
  1929.  
  1930.                 { **************************************************
  1931.                 NOTE: The following method must be made virtual in
  1932.                 the TFileList object in the file STDDLG.PAS unit.
  1933.                 At line # 101 add a "virtual" declaration.
  1934.                 ************************************************** }
  1935.                 Procedure   ReadDirectory(AWildCard : PathStr);  Virtual;
  1936.  
  1937.                 { **************************************************
  1938.                 NOTE: In TFileDialog in the unit STDDLG.PAS the
  1939.                 method ReadDirectory must be made PUBLIC.
  1940.                 At line # 152 remove the "private" declaration.
  1941.                 ************************************************** }
  1942.  
  1943. Fields ────────────────────────────────────────────────────────────────────
  1944. DriveList    DriveList : PbxDriveList;
  1945.  
  1946.                 List of all valid drive letters.
  1947.  
  1948. Methods ───────────────────────────────────────────────────────────────────
  1949. Init            Constructor Init(AWildCard: TWildStr; ATitle: String;
  1950.                                  InputName: String;
  1951.                                  AOptions: Word; HistoryId: Byte);
  1952.  
  1953.                 Creates the dialog box. Builds the drive list, inserts the
  1954.                 field input line, file info pane, file list box, drive and
  1955.                 directory list box. Completely overrides
  1956.                 TFileDialog.Init.
  1957. See also    TFileDialog
  1958.  
  1959. TbxFrame (TFrame)                                               TvViews
  1960.                 TbxFrame implements the window frame that is inserted into a
  1961.                 TbxWindow. TbxFrames are the same as TFrames except that
  1962.                 right mouse clicks on the close icon popup a control menu. I
  1963.                 was unable to figure out how to implement a double mouse
  1964.                 click to do this like Microsoft Windows. If you know how to
  1965.                 trap double clicks in this situation, please let me know!
  1966.  
  1967. Methods ───────────────────────────────────────────────────────────────────
  1968. HandleEvent    Procedure  HandleEvent(var Event: TEvent); Virtual;
  1969.  
  1970.                 Traps right mouse clicks on the close icon to generate
  1971.                 cmPopMenu commands for the parent window. The parent window
  1972.                 will respond by popping up a window control menu.
  1973. See also    TFrame, TWindow, TbxWindow
  1974.  
  1975. TbxFloatEdit (TbxNumericEdit)                                   TvInput
  1976. ──────────────────────────────────────────────────────────────────────────────
  1977.                 TbxFloatEdit is the base object for all floating point input
  1978.                 lines. Both the floating point types objects (Double, Real)
  1979.                 vary only in the range of numbers that are valid and the data
  1980.                 types returned and expected by SetData and GetData.
  1981.  
  1982.                 This is only an abstract object and should never be created
  1983.                 directly.
  1984.  
  1985. Fields ────────────────────────────────────────────────────────────────────
  1986. DP              DP : Byte;
  1987.  
  1988.                 Number of digits after the decimal place, as specifeid by
  1989.                 the EditMask.
  1990.  
  1991. Methods ───────────────────────────────────────────────────────────────────
  1992. Init            Constructor Init(var Bounds: TRect; const AMask: String);
  1993.  
  1994.                 Initializes the input line. The maximum edit size of the
  1995.                 field is calculated automatically from AMask. AMask should
  1996.                 contain only the characters '#' or '9' for mask characters.
  1997.                 The '9' allows the digits 0 through 9, while the '#' also
  1998.                 allows a minus sign to be entered. Literal characters may be
  1999.                 included in AMask, to create edit masks such as "$9999.999".
  2000.  
  2001.                 A decimal point may only be entered if one is included in
  2002.                 AMask. Only as many digits as specified in the edit mask may
  2003.                 be entered to the right of the decimal point. If a decimal
  2004.                 point exists, TbxFloatEdit accepts numbers with or without a
  2005.                 decimal point.
  2006.  
  2007. Load            Constructor Load(var S: TStream);
  2008. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  2009.  
  2010.                 Implements the logic needed to handle decimal points.
  2011.  
  2012. Store           Procedure Store(var S: TStream);
  2013. See also        TbxDoubleEdit, TbxEditLine, TbxRealEdit, TInputLine,
  2014.                 EditMask characters
  2015.  
  2016. TbxFormattedTextScroller (TScroller)                            TvViews
  2017. ──────────────────────────────────────────────────────────────────────────────
  2018.                 TbxFormattedTextScroller is a TScroller that will word wrap
  2019.                 and line wrap at carriage returns. Give it a pointer to a
  2020.                 formatted text buffer and it will do its best to display it.
  2021.                 Whenever the window is resized the text displayed by
  2022.                 TbxFormattedTextScroller is reformatted to fit into the new
  2023.                 window dimensions.
  2024.  
  2025. Fields ────────────────────────────────────────────────────────────────────
  2026. Buf             Buf : PbxCharArray;
  2027.  
  2028.                 Pointer to the data buffer.
  2029.  
  2030. BufSize         BufSize : Word;
  2031.  
  2032.                 Size of the data buffer pointed to by Buf.
  2033.  
  2034. Methods ───────────────────────────────────────────────────────────────────
  2035. Init            Constructor Init(var Bounds: TRect; AVScrollBar: PScrollBar;
  2036.                                  Buff: PbxCharArray; BuffSize: Word);
  2037.  
  2038.                 Initializes the view. Sets GrowMode to gfGrowHiX and
  2039.                 gfGrowHiY. Buffis a pointer to the data to be displayed.
  2040.                 BuffSize is the number of characters in the data. AVScrollBar
  2041.                 is the TScrollBar attached to the window which the
  2042.                 TbxFormattedTextScroller will be inserted into. AVScrollBar
  2043.                 can be nil, but this is not to be recommended. A horizontal
  2044.                 scroll bar is not needed.
  2045.  
  2046. Load        Constructor Load(var S: TStream);
  2047.  
  2048.                 Reads the object from stream S. The data in the buffer is not
  2049.                 loaded and BufSize is set to zero. The buffer must be set
  2050.                 through a call to SetData.
  2051.  
  2052. ChangeBounds    Procedure ChangeBounds(var Bounds: TRect); Virtual;
  2053.  
  2054.                 Changes the bounds of the vertical scroll bar to match those
  2055.                 of the scroller. Whenever the window is resized the number of
  2056.                 lines in the display is recalculated and the scroll bar is
  2057.                 updated.
  2058.  
  2059. DataSize    Function DataSize: Word; Virtual;
  2060.  
  2061.                 Returns the size of a TbxBufData record.
  2062.  
  2063. Draw        Procedure Draw; Virtual;
  2064. GetData         Procedure GetData(var Rec); Virtual;
  2065.  
  2066.                 Returns a pointer to the data buffer and the size of the
  2067.                 buffer in a TbxBufData record.
  2068.  
  2069. SetData         Procedure SetData(var Rec);Virtual;
  2070.  
  2071.                 Sets the data buffer pointer and data buffer size. Expects Rec
  2072.                 to be a TbxBufData record. Counts the number of lines based
  2073.                 on the current window size and scrolls to the top of the
  2074.                 display.
  2075. See also    TScroller
  2076.  
  2077. TbxFrameArray type                                              TvType
  2078. ──────────────────────────────────────────────────────────────────────────────
  2079. Declaration    TbxFrameArray = Array[1..8] of Char;
  2080. Function    Holds the characters used to draw 3D outlines and frames.
  2081.  
  2082. TbxHexBuff (TbxEditBuff)                                        TvViews
  2083. ──────────────────────────────────────────────────────────────────────────────
  2084.                 A descendant of TbxEditBuff for editing hexadecimal data.
  2085.                 This is the object type of the hex edit buffer in the
  2086.                 TbxEditBuffWindow.
  2087.  
  2088. Methods ───────────────────────────────────────────────────────────────────
  2089. Init            Constructor Init(Bounds: TRect; Buff: Pointer; BuffSize: Word;
  2090.                                  AVScrollBar: PScrollBar);
  2091.  
  2092.                 Calls TbxEditBuff.Init setting ItemWidth to two. Buff is a
  2093.                 pointer to the data buffer. BuffSize is the size of the data
  2094.                 buffer. AVScrollBar is the scroll bar attached to the parent
  2095.                 window and may be nil.
  2096.  
  2097. Draw            Procedure Draw; Virtual;
  2098.  
  2099.                 Overrides the inherited Draw to display the data buffer in
  2100.                 hexadecimal number format.
  2101.  
  2102. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  2103.  
  2104.                 Accepts only the characters 'A' through 'F' and the numbers 0
  2105.                 through 9, and Tab, for entry. When a valid character is
  2106.                 typed it inserts the character into the data buffer and
  2107.                 broadcasts three messages: cmUpdateView, cmEditView, and
  2108.                 kbRight. These messages inform peer views to redraw, inform
  2109.                 the parent to update the maximum edit position, and the
  2110.                 cursor to move to the next character.
  2111. See also    TbxAsciiBuff, TbxEditbuff, TbxAsciiHexEditor, TScroller
  2112.  
  2113. TbxHexEdit (TbxLongEdit)                                        TvInput
  2114. ──────────────────────────────────────────────────────────────────────────────
  2115.                 TbxHexEdit accepts long integers in hexadecimal format, the
  2116.                 characters 0 through 9, A through F, and $ are valid entries.
  2117.  
  2118. Methods ───────────────────────────────────────────────────────────────────
  2119. OutOfRangeMsg    Function OutOfRangeMsg: String; Virtual;
  2120.  
  2121.                 Returns the out of range error message with the the valid
  2122.                 range in hexadecimal format.
  2123.  
  2124. SetData         Procedure SetData(var Rec); Virtual;
  2125.  
  2126.                 Converts the LongInt value in Rec to a hex string and
  2127.                 displays it in the input line.
  2128. See also    TbxEditLine, TbxNumericEdit, TbxLongEdit, TInputLine
  2129.  
  2130. TbxLong type    TvType
  2131. ──────────────────────────────────────────────────────────────────────────────
  2132. Declaration    TbxLong    = record
  2133.                         Low, High : Word;
  2134.                 end;
  2135. Function    Provides easy access the Low and High words of a LongInt.
  2136.  
  2137. TbxIcon (TView)                                                 TvViews
  2138. ──────────────────────────────────────────────────────────────────────────────
  2139.                 TbxIcon serves as the base object for TbxWindowIcon. TbxIcons
  2140.                 display a text string on the desktop. They can be moved
  2141.                 around the desktop. You can use the TbxIcon to create more
  2142.                 "graphical" icons by overriding the Draw method.
  2143. Fields ────────────────────────────────────────────────────────────────────
  2144. Title           Title : PString;
  2145.  
  2146.                 Text string to display on the desktop.
  2147.  
  2148. Methods ───────────────────────────────────────────────────────────────────
  2149. Init            Constructor Init(ATitle: TTitleStr);
  2150.  
  2151.                 Allocates a string to hold ATitle by calling NewStr. ATitle
  2152.                 can be multiple lines by including a '^M. in the string. Sets
  2153.                 the bounds to fit the lower view into the lower left corner
  2154.                 of the desktop. Sets Options to include ofSelectable and
  2155.                 ofTopSelect.
  2156.  
  2157. Load            Constructor Load(var S: TStream);
  2158. Done            Destructor Done; Virtual;
  2159.  
  2160.                 Calls DisposeStr to dispose Title.
  2161.  
  2162. Draw            Procedure Draw; Virtual;
  2163.  
  2164.                 Draws Title on the desktop. Displays multiple lines if there
  2165.                 are any '^M' characters in Title.
  2166.  
  2167. GetPalette    Function GetPalette: PPalette; Virtual;
  2168.  
  2169.                 Returns a pointer to the CIcon  palette.
  2170.  
  2171. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  2172.  
  2173.                 Overrides the inherited HandleEvent to implement dragging of
  2174.                 the icon around the desktop.
  2175.  
  2176. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  2177.  
  2178.                 Redraws the icon if the state is set to dragging.
  2179.  
  2180. SizeLimits    Procedure SizeLimits(var Min, Max: TPoint); Virtual;
  2181.  
  2182.                 Restricts the icon size to that set in the constructor.
  2183.  
  2184. Store           Procedure Store(var S: TStream);
  2185. See also    TView, TbxWindowIcon, TbxWindow
  2186.  
  2187. TbxItemRec type                                                 TvType
  2188. ──────────────────────────────────────────────────────────────────────────────
  2189. Declaration    TbxItemRec = record
  2190.                         Owner, Item : Pointer;
  2191.                 end;
  2192. Function    Used to pass information between two TbxPairedListBox objects.
  2193. See also    TbxPairedListBox
  2194.  
  2195. TbxIntegerEdit (TbxLongEdit)                                    TvInput
  2196. ──────────────────────────────────────────────────────────────────────────────
  2197.                 A descendant of TbxLongEdit for Integers.
  2198.  
  2199. Methods ───────────────────────────────────────────────────────────────────
  2200. Init            Constructor Init(var Bounds: TRect; const AMask: String;
  2201.                                  AMin: Byte; AMax: Byte);
  2202.  
  2203.                 The Init constructor exists mainly to provide range checking
  2204.                 of the AMin and AMax parameters. Calls the TbxLongEdit.Init
  2205.                 constructor. AMask defines a picture that controls what
  2206.                 characters may be entered. AMask can contain literal
  2207.                 characters as well as digit place holders.  Two characters
  2208.                 can be used for indicating digits, '#' and '9'. The '9'
  2209.                 allows the digits 0 through 9, while the '#' also allows
  2210.                 entry of a minus sign.
  2211.  
  2212. DataSize    Function DataSize: Word; Virtual;
  2213.  
  2214.                 Returns the size of an Integer.
  2215.  
  2216. GetData         Procedure GetData(var Rec); Virtual;
  2217.  
  2218.                 Returns the current value as an Integer in Rec.
  2219.  
  2220. SetData         Procedure SetData(var Rec); Virtual;
  2221.  
  2222.                 Interprets the data in Rec as an Integer.
  2223. See also    TbxEditLine, TbxLongEdit, TInputLine
  2224.  
  2225. TbxLinkedBox (TListBox)                                         TvDialog
  2226. ──────────────────────────────────────────────────────────────────────────────
  2227.                 TbxLinkedBox is a a list box that can be linked to a
  2228.                 TbxLinkedLine object. Each time the focus in the list
  2229.                 changes, the information displayed in the input line changes.
  2230.  
  2231.                 The list box will generate an event using the link command
  2232.                 assigned with the constructor of each object. The event will
  2233.                 include a pointer to the focused item in the InfoPtr field.
  2234.                 The TbxLinkedLine will handle the event and extract the data
  2235.                 it needs from the focused item and update its display.
  2236.  
  2237. Fields ────────────────────────────────────────────────────────────────────
  2238. LinkEvent    LinkEvent : Word;
  2239.  
  2240.                 The unique command id assigned in Init.
  2241.  
  2242. Init            Constructor Init(var Bounds: TRect; ANumCols: Word;
  2243.                                  AScrollBar: PScrollBar;
  2244.         EventCode: Word);
  2245.  
  2246.                 Init is the same as TListBox.Init except for the EventCode
  2247.                 parameter. EventCode should be the same one assigned to the
  2248.                 TbxLinkedLine associated with this list box. EventCode is
  2249.                 assigned to LinkEvent and is used to hook the two controls
  2250.                 together. EventCode must be unique for each paired
  2251.                 TbxLinkedBox and TbxLinkedLine.If the code is not unique
  2252.                 other TbxLinkedLines will also interact with the list box.
  2253.  
  2254. Load            Constructor Load(var S: TStream);
  2255. FocusItem    Procedure FocusItem(Item: Integer); Virtual;
  2256.  
  2257.                 Generates a broadcast event of type LinkEvent with a pointer
  2258.                 to the currently focused item.The pointer to the focused item
  2259.                 is stored in the InfoPtr field of the TEvent. The dialog box
  2260.                 should have a TbxLinkedLine that responds to the LinkEvent.
  2261.  
  2262. Store           Procedure Store(var S: TStream);
  2263. See also    TbxLinkedLine, TListBox
  2264.  
  2265. TbxLinkedLine (TInputLine)        TvDialog
  2266. ──────────────────────────────────────────────────────────────────────────────
  2267.                 TbxLinkedLine is linked to a TbxLinkedBox.It is just like an
  2268.                 ordinary input line, except that it updates its contents
  2269.                 whenever the focus of the list box changes.
  2270.  
  2271.                 To link to a list box, you assign a unique command id to the
  2272.                 input line and list box. Each list box and input line pair
  2273.                 must be assigned a unique command. The list box will generate
  2274.                 events using the command id. The InfoPtr field of the event
  2275.                 will hold a pointer to the list box data item. The default
  2276.                 HandleEvent expects the Event.InfoPtr to be a PString, this
  2277.                 is the default for standard list boxes.
  2278.  
  2279. Fields ────────────────────────────────────────────────────────────────────
  2280. LinkEvent    LinkEvent : Word;
  2281.  
  2282.                 The unique command id assigned in Init.
  2283.  
  2284. Methods ───────────────────────────────────────────────────────────────────
  2285. Init            Constructor Init(var Bounds: TRect; AMaxLen: Integer;
  2286.                                  EventCode: Word);
  2287.  
  2288.                 Init is the same as TInputLine.Init except for the EventCode
  2289.                 parameter. EventCode should be the same one assigned to the
  2290.                 TbxLinkedBox associated with this input line. EventCode is
  2291.                 assigned to LinkEvent and is used to hook the two controls
  2292.                 together. EventCode must be unique for each paired
  2293.                 TbxLinkedBox and TbxLinkedLine. If the code is not unique
  2294.                 other TbxLinkedLines will also link to the list box.
  2295.  
  2296. Load            Constructor Load(var S: TStream);
  2297. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  2298.  
  2299.                 Processes any events of type LinkEvent. When such an event is
  2300.                 processed, the InfoPtr field will hold a pointer to the
  2301.                 focused item in the list box. By default InfoPtr points to a
  2302.                 string. The input line updates its contents with the string
  2303.                 pointed to by InfoPtr.
  2304.  
  2305. Store           Procedure Store(var S: TStream);
  2306. See also    TbxLinkedBox, TInputLine
  2307.  
  2308. TbxListBox (TListBox)                                           TvDialog
  2309. ─────────────────────────────────────────────────────────────────────────────
  2310.                 TbxListBox is a list box that processes a TbxCollection of
  2311.                 TbxObjects. TbxListBox gets the text to be displayed from the
  2312.                 TbxObject.GetText method. This means that one list box can
  2313.                 handle any type of list, as long as that list is a collection
  2314.                 is of TbxObjects.
  2315.  
  2316.                 If you have a list box that displays data from non-string
  2317.                 objects, you need to create new a TObject type. With the
  2318.                 standard list box you also need to create a new TListBox type
  2319.                 and override the GetText method. If you use TbxListBox you
  2320.                 will not have to create a new TObject and override GetText,
  2321.                 since TbxListBox.GetText already knows how to get the text
  2322.                 from any TbxObject in a TbxCollection.
  2323.  
  2324. Methods ───────────────────────────────────────────────────────────────────
  2325. GetText         Function GetText(Item: Integer;
  2326.                                  MaxLen: Integer): String; Virtual;
  2327.  
  2328.                 Calls the GetText method for the Itemth object in the list
  2329.                 and returns  the string.
  2330. See also    TbxCollection, TbxObject, TListBox
  2331.  
  2332. TbxLongEdit (TbxNumeric)                                        TvInput
  2333. ──────────────────────────────────────────────────────────────────────────────
  2334.                 TbxLongEdit is the base object for all integer edit lines.
  2335.                 AMin and AMax define the valid range of values for the field.
  2336.                 If AMin and AMax are both zero any number may be entered. All
  2337.                 the other integer objects vary only in the range of numbers
  2338.                 that are valid and the data type used by SetData and GetData.
  2339.  
  2340. Fields ────────────────────────────────────────────────────────────────────
  2341. Min             Min : LongInt;
  2342. Max             Max : LongInt;
  2343.  
  2344.                 Maximum and minimum acceptable values.
  2345.  
  2346. Methods ───────────────────────────────────────────────────────────────────
  2347. Init            Constructor Init(var Bounds: TRect; const AMask: String;
  2348.                                  AMin: LongInt; AMax: LongInt);
  2349.  
  2350.                 The maximum edit size of the field is calculated
  2351.                 automatically from AMask. AMask defines a picture that
  2352.                 controls what characters may be entered. AMask can contain
  2353.                 literal charaters as well as number digit place holders. Two
  2354.                 characters can be used for indicating digits, '#' and '9'.
  2355.                 The '9' allows the digits 0 through 9, while the '#' also
  2356.                 allows a minus sign to be entered.
  2357.  
  2358. Load            Constructor Load(var S: TStream);
  2359. DataSize    Function DataSize: Word; Virtual;
  2360.  
  2361.                 Returns the size of a LongInt.
  2362.  
  2363. GetData         Procedure GetData(var Rec); Virtual;
  2364.  
  2365.                 Returns a LongInt in Rec.
  2366.  
  2367. OutOfRange    Function OutOfRange: Boolean; Virtual;
  2368.  
  2369.                 Tests the current value to see if it is in range. If Min or
  2370.                 Max is not zero, OutOfRange returns True if the entered
  2371.                 value is not in the range Min to Max inclusive.
  2372.  
  2373. OutOfRangeMsg    Function OutOfRangeMsg: String; Virtual;
  2374.  
  2375.                 Returns the error message displayed for out of range errors.
  2376.  
  2377. SetData         Procedure SetData(var Rec); Virtual;
  2378.  
  2379.                 Changes the data to the LongInt value in Rec and redraws the
  2380.                 input line.
  2381.  
  2382. Store           Procedure Store(var S: TStream);
  2383. See also        TbxByteEdit, TbxEditLine, TbxIntegerEdit, TbxHexEdit,
  2384.                 TbxWordEdit
  2385.  
  2386. TbxMenuBar (TMenuBar)                                           TvMenus
  2387. ──────────────────────────────────────────────────────────────────────────────
  2388.                 TbxMenuBar provides a descendant of TMenuBar that can display
  2389.                 check marked menu items. To use check mark menu items create
  2390.                 a TbxMenuBar instead of the normal TMenuBar and insert into
  2391.                 the menu bar as normal. Just replace the standard NewItem,
  2392.                 with a call to the function NewMarkedItem. Call ToggleMarker,
  2393.                 SetMarker, ClearMarker, and MarkerIsSet, to manipulate and
  2394.                 check for marked items. Use ResetMarkers handle a set of
  2395.                 check mark menu items
  2396.  
  2397. Methods ───────────────────────────────────────────────────────────────────
  2398. ClearMarker    Procedure ClearMarker(Cmd: Word);
  2399.  
  2400.                 Clears the check mark from the menu item with the command Cmd.
  2401.  
  2402. FindCmd         Function FindCmd(AMenu: PMenu; Cmd: Word): PMenuItem;
  2403.  
  2404.                 Returns a pointer to the menu item with the command matching
  2405.                 Cmd.This can be used to find any menu item, check mark or
  2406.                 not.
  2407.  
  2408. HandleEvent    Procedure HandleEvent(var E : TEvent);      Virtual;
  2409.  
  2410.                 HandleEvent will automatically toggle a checked menu item on
  2411.                 or off as needed (if the menu command is cmMarkStart through
  2412.                 cmMarkEnd). However, this is only useful when multiple items
  2413.                 can be checked at the same time. If only one item in a set
  2414.                 can be checked at a time, you should use the ResetMarkers
  2415.                 procedure to put the menu in the correct state.
  2416.  
  2417. MarkerIsSet    Function MarkerIsSet(Cmd : Word): Boolean;
  2418.  
  2419.                 Returns True if the menu item assigned to Cmd is checked.
  2420.  
  2421. ResetMarkers    Procedure ResetMarkers(FirstCmd: Word; LastCmd: Word;
  2422.                                        NewCmd: Word);
  2423.  
  2424.                 ResetMarkers is used to manipulate a logical set of check
  2425.                 mark menu items. First, all menu items from FirstCmd through
  2426.                 LastCmd are unchecked. Then the menu item assigned to NewCmd
  2427.                 is checked.
  2428.  
  2429. SetMarker    Procedure SetMarker(Cmd: Word);
  2430.  
  2431.                 Sets the check mark for the menu item that matches Cmd.
  2432.  
  2433. ToggleMarker    Procedure ToggleMarker(Cmd: Word);
  2434.  
  2435.                 Toggles the check mark for the menu item assigned the Cmd
  2436.                 command.
  2437. See also        CheckMark, CheckMarkLen, CheckMarkNull, NewMarkedItem,
  2438.                 cmXXXX constants
  2439.  
  2440. TbxMessageDialog (TDialog)                                      TvDialog
  2441. ──────────────────────────────────────────────────────────────────────────────
  2442.                 TbxMessageDialog is an easier way to display messages in a
  2443.                 dialog. TbxMessageDialog takes the same parameters as the
  2444.                 standard MessageBox function for displaying a title and
  2445.                 buttons. It does not handle the '^M' formatting parameters.
  2446.                 However, you can add multiple strings through multiple calls
  2447.                 to AddMessage. The dialog will size itself based on the text
  2448.                 to be displayed. There is also checking in the X axis to make
  2449.                 sure the strings are not too long.
  2450.  
  2451. Fields ────────────────────────────────────────────────────────────────────
  2452. SList           SList : TbxUnsortedStringCollection;
  2453.  
  2454.                 List of the strings to display in the dialog.
  2455.  
  2456. DOptions    DOptions : Word;
  2457.  
  2458.                 Holds the button and title options for the message box.
  2459.  
  2460. Methods ───────────────────────────────────────────────────────────────────
  2461. Init            Constructor Init(AOptions: Word);
  2462.  
  2463.                 Calls TDialog.Init with a dummy bounds rect and a title based
  2464.                 on the contents of the AOptions parameter. AOptions is stored
  2465.                 in the DOptions field. The dialog bounds does not need to be
  2466.                 supplied, since it is calculated before the dialog box is
  2467.                 executed. The AOptions flag also supplies the information on
  2468.                 buttons to be added. Use the mfXXXX constants in the
  2469.                 MSGBOX.PAS unit supplied with Turbo Vision to set the value
  2470.                 of AOptions.
  2471.  
  2472. AddMessage    Procedure AddMessage(St: String);
  2473.  
  2474.                 Adds St to the end of the list of strings to display in the
  2475.                 dialog box. AddMessage can be called as many times as needed
  2476.                 to add dialog text.
  2477.  
  2478. Execute         Function Execute: Word; Virtual;
  2479.  
  2480.                 Execute is normally called only by TProgram.ExecuteDialog. It
  2481.                 sizes the dialog, adds buttons as indicated by the DOptions
  2482.                 field, then calls the inherited Execute method.
  2483. See Also    MessageBox, mfXXXX constants
  2484.  
  2485. TbxMinMaxButton (TView)                                         TvViews
  2486. ──────────────────────────────────────────────────────────────────────────────
  2487.                 This object implements a minimize window icon inserted into
  2488.                 the upper right corner of a window frame. TbxMinMaxButton is
  2489.                 used by the TbxWindow object.
  2490.  
  2491. Methods ───────────────────────────────────────────────────────────────────
  2492. Init            Constructor Init(var Bounds: TRect);
  2493.  
  2494.                 Calls Tview.Init then sets GrowMode to include gfGrowLoX and
  2495.                 gfGrowHiX.
  2496.  
  2497. Draw            Procedure Draw; Virtual;
  2498. GetPalette    Function GetPalette: PPalette; Virtual;
  2499.  
  2500.                 Returns a pointer to the CMinMax palette.
  2501.  
  2502. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  2503.  
  2504.                 Puts a cmMinimize event into the event queue whenever a mouse
  2505.                 button is pressed in the view.
  2506.  
  2507. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  2508.  
  2509.                 If AState includes sfDragging, SetState redraws the view.
  2510.                 Whenever sfDragging is set or cleared, the view must be
  2511.                 redrawn to reflect the new state.
  2512. See also    TbxWindow, TView
  2513.  
  2514. TbxMultiScrollBar (TScrollBar)                                  TvViews
  2515. ──────────────────────────────────────────────────────────────────────────────
  2516.                 This is a scroll bar object that can be used by two or more
  2517.                 views at the same time. It will always be active, no matter
  2518.                 which of the views which own it is focused.
  2519.  
  2520. Methods ───────────────────────────────────────────────────────────────────
  2521. Done            Destructor Done; Virtual;
  2522. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  2523.  
  2524.                 Traps calls to change the state of the sfVisible bit in the
  2525.                 State field. sfVisible must always be set, so the scroll bar
  2526.                 will always be displayed, no matter which of its associated
  2527.                 views is active.
  2528. See also        TbxAsciiHexEditor, TScrollBar
  2529.  
  2530. TbxNumericEdit (TbxEditLine)                                    TvInput
  2531. ──────────────────────────────────────────────────────────────────────────────
  2532.                 This is the base object for all numeric edit line objects. It
  2533.                 is only an abstract object and is not intended to be created
  2534.                 directly.
  2535.  
  2536. Fields ────────────────────────────────────────────────────────────────────
  2537. ErrCode         ErrCode : Integer;
  2538.  
  2539.                 Holds any string to numeric conversion errors.
  2540.  
  2541. Methods ───────────────────────────────────────────────────────────────────
  2542. Handle Event    Procedure  HandleEvent(var Event: TEvent); Virtual;
  2543.  
  2544.                 Only allows characters in the DigitOnlySet, NumberOnlySet,
  2545.                 HexOnlySet to be entered. Handles insertion of '-' for all
  2546.                 numbers and '$' for hexadecimal numbers.
  2547.  
  2548. OutOfRange    Function OutOfRange: Boolean; Virtual;
  2549.  
  2550.                 This method is called by Valid to check if the number is in
  2551.                 the valid range. OutOfRange returns True if the number is out
  2552.                 of the valid range. By default TbxNumeric.OutOfRange returns
  2553.                 False. Descendant objects should override OutOfRange.
  2554.  
  2555. OutOfRangeMsg    Function OutOfRangeMsg: String; Virtual;
  2556.  
  2557.                 Returns an error message to be displayed for out of range
  2558.                 errors.
  2559.  
  2560. Valid           Function Valid(Command: Word): Boolean; Virtual;
  2561.  
  2562.                 If OutOfRange returns True, Valid sends an error event to the
  2563.                 owner view. This error event is of type cmFieldError and the
  2564.                 InfoPtr field is a pointer to an error message string.
  2565. See also    TbxEditLine, TbxFloatEdit, TbxLongEdit
  2566.  
  2567. TbxObject (TObject)                                             TvObjects
  2568. ──────────────────────────────────────────────────────────────────────────────
  2569.                 TbxObject is used with many list box objects in TV Tool Box.
  2570.                 It has a method that returns a string for display in a list
  2571.                 box. By using descendants of TbxObject one list box object
  2572.                 can handle any type of collection of TbxObjects (or
  2573.                 descendants). It is easier to add a GetText method to a new
  2574.                 object, which you most likely needed to create anyway, than
  2575.                 create a new list box type.
  2576.  
  2577.                 This is intended as an abstract object only. It should never
  2578.                 be instantiated directly, only derived objects should
  2579.                 actually be created.
  2580.  
  2581. Methods ───────────────────────────────────────────────────────────────────
  2582. GetText         Function GetText(MaxLen: Integer): String; Virtual;
  2583.  
  2584.                 This method should return a string of MaxLen. The string will
  2585.                 be used as a line in a list box.
  2586. See also    TbxListBox, TObject
  2587.  
  2588. TbxPairedListBox (TbxListBox)                                   TvDialog
  2589. ──────────────────────────────────────────────────────────────────────────────
  2590.                 TbxPairedListBox implements a method of selecting multiple
  2591.                 items from a list. TbxPairedListBox objects must always be
  2592.                 used in pairs. Items selected in one list box are deleted and
  2593.                 inserted into the other list box. This list box expects a
  2594.                 TbxCollection of TbxObjects, but this can be changed by
  2595.                 overriding the default GetText method.
  2596.  
  2597. Methods ───────────────────────────────────────────────────────────────────
  2598. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  2599.  
  2600.                 Processes double mouse presses and cmTakeItem commands. 
  2601.                 Double mouse presses behave like the space bar to 
  2602.                 select items. Selected items are deleted and inserted 
  2603.                 into the other list box.
  2604.  
  2605.                 If a cmTakeItem command is received, HandleEvent 
  2606.                 inserts the object pointed to by the InfoPtr field of 
  2607.                 the event record into its collection.
  2608.  
  2609. SelectItem    Procedure SelectItem(Item: Integer); Virtual;
  2610.  
  2611.                 Deletes the item at Item in the collection and sends a
  2612.                 cmTakeItem message to the other list box in the pair. The
  2613.                 cmTakeItem message informs the other list box, to insert the
  2614.                 passed object into its collection. A pointer to the object is
  2615.                 passed in the InfoPtr field of the TEvent record.
  2616. See also        TbxCollection, TbxListBox, TbxPairedStrListBox, TListBox,
  2617.                 TCollection
  2618.  
  2619. TbxPairedStrListBox (TbxPairedListBox)                          TvDialog
  2620. ──────────────────────────────────────────────────────────────────────────────
  2621.                 This is a paired list box that uses a collection of strings,
  2622.                 instead of a collecion of TbxObjects. The collection for
  2623.                 this list box must be a TStringCollection.
  2624.  
  2625. Methods ───────────────────────────────────────────────────────────────────
  2626. GetText         Function GetText(Item: Integer;
  2627.                                  MaxLen: Integer): String; Virtual;
  2628. See also    TbxPairedListBox, TCollection, TListBox, TStringCollection
  2629.  
  2630. TbxPercentDialog (TbxRunDialog)                                 TvDialog
  2631. ──────────────────────────────────────────────────────────────────────────────
  2632.                 TbxPercentDialog is a descendant of TbxRunDialog used for
  2633.                 displaying percent done and a progress bar during long
  2634.                 processing sequences. As your processing is being done, a
  2635.                 call to Increment or IncrementBy will change the percent
  2636.                 complete and update the progress bar.  You must define a
  2637.                 Process method to do whatever actual work is needed.
  2638.  
  2639. Fields ────────────────────────────────────────────────────────────────────
  2640. Total           Total : LongInt;
  2641.  
  2642.                 The maximum value of Count,  when the percent done will equal
  2643.                 100.
  2644.  
  2645. Count           Count : LongInt;
  2646.  
  2647.                 Current completion count, used with Total to calculate the
  2648.                 percent complete.
  2649.  
  2650. Step            Step : Word;
  2651.  
  2652.                 The amount to increment Count by at each step.
  2653.  
  2654. Pct             Pct : PStaticText;
  2655.  
  2656.                 The percent complete text.
  2657.  
  2658. Bar             Bar : PStaticText;
  2659.  
  2660.                 The progress bar display.
  2661.  
  2662. Methods ───────────────────────────────────────────────────────────────────
  2663. Init            Constructor Init(ATitle: TTitleStr; AMessage: String;
  2664.                                  ATotal: LongInt; AOptions: Word);
  2665.  
  2666.                 ATitle is the title for the dialog box. AMessage is the
  2667.                 initial value of a changeable message that can be display in
  2668.                 the first line of the dialog box. If you pass a message
  2669.                 string, you must set AOptions to include mfMessageLine.
  2670.  
  2671.                 AStep is the size to increase the completion counter by at
  2672.                 each step in processing and ATotal is the maximum (or
  2673.                 completed) size of the counter.
  2674.  
  2675. Load            Constructor Load(var S: TStream);
  2676. Increment    Procedure Increment;
  2677.  
  2678.                 Each time you want to indicate some progress, call Increment
  2679.                 to change the completion counter by Step amount.
  2680.  
  2681. IncrementBy     Procedure IncrementBy(AStep : Word);
  2682.  
  2683.                 Instead of calling Increment, you can call IncrementBy
  2684.                 supplying the amount to increment the count by in AStep.
  2685.  
  2686. Store           Procedure Store(var S: TStream);
  2687. See also    TbxRunDialog, TDialog
  2688.  
  2689. TbxPosIndicator (TView)                                         TvViews
  2690. ──────────────────────────────────────────────────────────────────────────────
  2691.                 This object is a position indicator, it is intended to be
  2692.                 inserted into a TWindow frame.
  2693.  
  2694. Fields ────────────────────────────────────────────────────────────────────
  2695. Pos             Pos : LongInt;
  2696.  
  2697.                 Current position.
  2698.  
  2699. Methods ───────────────────────────────────────────────────────────────────
  2700. Init            Constructor Init(var Bounds: TRect);
  2701.  
  2702.                 Sets GrowMode to gfGrowLoY and gfGrowHiY.  Initializes Pos to
  2703.                 1.
  2704.  
  2705. Load            Constructor Load(var S: TStream);
  2706. DataSize    Function  DataSize: Word; Virtual;
  2707.  
  2708.                 Returns the size of Pos.
  2709.  
  2710. Draw            Procedure Draw; Virtual;
  2711. GetData         Procedure GetData(var Rec); Virtual;
  2712.  
  2713.                 Returns the value in Pos as a LongInt type in Rec.
  2714.  
  2715. GetPalette    Function GetPalette: PPalette; Virtual;
  2716.  
  2717.                 Returns a pointer to the CPosIndicator palette.
  2718.  
  2719. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  2720. SetData         Procedure SetData(var Rec); Virtual;
  2721.  
  2722.                 Sets Pos to the LongInt value stored in Rec.
  2723.  
  2724. Store           Procedure Store(var S: TStream);
  2725. See also        TView, TWindow
  2726.  
  2727. TbxPrintDialog (TbxRunDialog)                                   TvDialog
  2728. ──────────────────────────────────────────────────────────────────────────────
  2729.                 TbxPrintDialog is a descendant of TbxRunDialog to be used as
  2730.                 an interface for printing. You must define a Process method
  2731.                 to handle the actual print output.
  2732.  
  2733. Methods ───────────────────────────────────────────────────────────────────
  2734. Init            Constructor Init(ATitle: TTitleStr; AMessage: String;
  2735.                                  AOptions: Word);
  2736.  
  2737.                 Defaults the dialog box size to 44 columns and 7 rows and
  2738.                 centers the dialog in the desktop.
  2739. See also        TbxRunDialog
  2740.  
  2741. TbxRadioButtons (TRadioButtons)                                 TvInput
  2742. ──────────────────────────────────────────────────────────────────────────────
  2743.                 TbxRadioButtons are here so all data entry objects can have
  2744.                 field locking and error checking. All other functionality is
  2745.                 identical to the normal radio buttons.
  2746.  
  2747. Fields ────────────────────────────────────────────────────────────────────
  2748. ID              ID : Word;
  2749.  
  2750.                 Currently assigned id number. Id numbers are assigned
  2751.                 automatically by TbxEntryDialog.Insert. Id numbers must be
  2752.                 unique.
  2753.  
  2754. LLabel          LLabel : PLabel;
  2755.  
  2756.                 Pointer to the label associated with the radio buttons.
  2757.  
  2758. EditFlags    EditFlags : Word;
  2759.  
  2760.                 Holds the dfXXX flags used to control editing and formatting
  2761.                 options. Currently there are no edit flags that affect radio
  2762.                 buttons.
  2763.  
  2764. Methods ───────────────────────────────────────────────────────────────────
  2765. Init            Constructor Init(var Bounds: TRect; AStrings: PSItem);
  2766.  
  2767.                 Creates a set of radio buttons with the given bounds by
  2768.                 calling TRadioButtons.Init. Sets the ID and EditFlags to
  2769.                 zero, LLabel to nil. Sets the EventMask to include broadcast
  2770.                 events.
  2771.  
  2772. Load            Constructor Load(var S: TStream);
  2773. AddLabel    Procedure AddLabel(ALabel: PLabel);
  2774.  
  2775.                 Attaches a label to the radio buttons. Labels should be
  2776.                 attached to their corresponding controls so that when the
  2777.                 control is locked the label can also be locked. Label text
  2778.                 will be used to construct the default error messages.
  2779.  
  2780. GetId           Function GetID: Word;
  2781.  
  2782.                 Returns the ID number assigned to the radio buttons. ID
  2783.                 numbers are used by TbxEntryDialog to locate a specific
  2784.                 control in the dialog box and return a pointer to it.
  2785.  
  2786.                 ID numbers are useful for dialogs stored on streams. ID
  2787.                 numbers will remain constant when the dialog is loaded from a
  2788.                 stream, where as any pointers to the object will change.
  2789.  
  2790. GetFieldName    Function GetFieldName: String; Virtual;
  2791.  
  2792.                 Used to get the field name displayed with error messages
  2793.                 generated by the Valid method. By default it returns the text
  2794.                 in the label pointed to by LLabel.
  2795.  
  2796. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  2797.  
  2798.                 Calls the inherited HandleEvent then processes any cmSetId or
  2799.                 cmIdentify commands. cmSetId commands are issued by
  2800.                 TbxEntryDialog to set the ID of the field. CmIdentify
  2801.                 commands cause the object to return a pointer to itself.
  2802.  
  2803. Lock            Procedure Lock;
  2804.  
  2805.                 Locks the field and label by setting sfDisabled in the State
  2806.                 flag.
  2807.  
  2808. SetEditFlag    Procedure SetEditFlag(AFlag: Word; Enable: Boolean);
  2809.  
  2810.                 Sets the EditFlags for the radio buttons. No edit flags apply
  2811.                 to radio buttons.
  2812.  
  2813. SetID           Procedure SetID(AFieldID: Word);
  2814.  
  2815.                 Sets ID to AFieldID.
  2816.  
  2817. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  2818.  
  2819.                 Calls the inherited SetState, then, if AState contains
  2820.                 sfDisabled, calls the LLabel^.SetState with the value
  2821.                 sfDisabled and the Enable parameter.
  2822.  
  2823. Store           Procedure Store(var S: TStream);
  2824. UnLock          Procedure UnLock;
  2825.  
  2826.                 Unlocks the field and label by clearing the sfDisabled bit in
  2827.                 the State flag.
  2828. See also        TbxEntryDialog,
  2829. TRadioButtons
  2830.  
  2831. TbxRealEdit (TbxFloatEdit)                                      TvInput
  2832. ──────────────────────────────────────────────────────────────────────────────
  2833. Fields ────────────────────────────────────────────────────────────────────
  2834. Min             Min : Real;
  2835.  
  2836.                 The smallest number that is a valid entry.
  2837.  
  2838. Max             Max : Real;
  2839.  
  2840.                 The largest number that is a valid entry.
  2841.  
  2842. Methods ───────────────────────────────────────────────────────────────────
  2843. Init            Constructor Init(var Bounds: TRect; const AMask: String;
  2844.                                  AMin: Double; AMax: Double);
  2845.  
  2846.                 Calls the inherited Init then set sets Min and Max. AMask
  2847.                 defines a picture that controls what characters may be
  2848.                 entered.  AMask can contain literal characters as well as
  2849.                 number digit place holders. Two characters can be used for
  2850.                 indicating digits, '#' and '9'. The '9' allows the entry of
  2851.                 digits 0 through 9, while the '#' also allows entry of a
  2852.                 minus sign. If a decimal point (as defined in the DecimalPt
  2853.                 constant) appears in the edit mask, the user may enter a
  2854.                 decimal point in the number.
  2855.  
  2856. Load            Constructor Load(var S: TStream);
  2857. DataSize    Function DataSize: Word; Virtual;
  2858.  
  2859.                 Returns the size of a Real.
  2860.  
  2861. GetData         Procedure GetData(var Rec); Virtual;
  2862.  
  2863.                 Returns the value in Rec as a Real.
  2864.  
  2865. OutOfRange    Function OutOfRange: Boolean; Virtual;
  2866.  
  2867.                 Tests the current value to see if it is in range. If Min or
  2868.                 Max is not zero, OutOfRange returns True if the entered
  2869.                 value is not in the range Min to Max inclusive.
  2870.  
  2871. OutOfRangeMsg    Function OutOfRangeMsg: String; Virtual;
  2872.  
  2873.                 Returns the error message displayed for out of range errors.
  2874.  
  2875. SetData         Procedure SetData(var Rec); Virtual;
  2876.  
  2877.                 Set the current value from the Real variable in Rec.
  2878.  
  2879. Store           Procedure Store(var S: TStream);
  2880. See also        TbxDoubleEdit, TbxEditLine, TbxFloatEdit, TbxNumericEdit,
  2881.                 EditMask characters
  2882.  
  2883. TbxRunDialog (TDialog)                                          TvDialog
  2884. ──────────────────────────────────────────────────────────────────────────────
  2885.                 TbxRunDialog is the base object used to create several type
  2886.                 of progress display dialogs. TbxRunDialogs do some work,
  2887.                 while allowing the user to press a Cancel button to abort
  2888.                 processing. TbxRunDialog is the parent of the
  2889.                 TbxPercentDialog and TbxPrintDialog objects.
  2890.  
  2891.                 To use a TbxRunDialog you must provide a Process method. The
  2892.                 Process method is where all work be done.
  2893.                 TbxRunDialog.Execute will repeatedly call your Process
  2894.                 method, until there is nothing left to do. Your Process
  2895.                 method needs to do the work in small bits, so that Execute
  2896.                 can run and check for user input. When all the work is done,
  2897.                 Process sets the RunState flag to cmJobComplete and Execute
  2898.                 terminates. If RunState is ever set to cmCancelJob, which
  2899.                 means the user aborted, your Process method must close down
  2900.                 whatever it is doing so that Execute can terminate safely.
  2901.  
  2902. Fields ────────────────────────────────────────────────────────────────────
  2903. Msg             Msg : PStaticText;
  2904.  
  2905.                 Static text message displayed in first row of the dialog.
  2906.  
  2907. RunState    RunState : Word;
  2908.  
  2909.                 Current state of the processing.
  2910.  
  2911. pfFlags         pfFlags : Word;
  2912.  
  2913.                 Holds the dialog button options.
  2914.  
  2915. BtnRow          BtnRow : Byte;
  2916.  
  2917.                 The row in the dialog box where the buttons are inserted.
  2918.  
  2919. SButton         SButton : PButton;
  2920. CButton         CButton : PButton;
  2921.  
  2922.                 Pointers to the dialog box buttons. The buttons change
  2923.                 depending on the current state of the dialog box.
  2924.  
  2925. Methods ───────────────────────────────────────────────────────────────────
  2926. Init            Constructor Init(var Bounds: TRect; ATitle: TTitleStr;
  2927.                                  AMessage: String; AOptions: Word;
  2928.                                  ButtonRow: Byte);
  2929.  
  2930.                 ATitle is the dialog box title. You can choose several
  2931.                 different combinations of buttons for the dialog. If AOptions
  2932.                 equals mfCancel, only a cancel button will be added. If it
  2933.                 equals mfCancel and mfOk, start and cancel buttons will be
  2934.                 added. If AOptions includes mfPause, the dialog will also
  2935.                 have pause capabilities. ButtonRow is the dialog box row
  2936.                 where all buttons will be inserted.
  2937.  
  2938.                 You can display a changeable message for the user by
  2939.                 including mfMessageLine in AOptions. After the dialog is
  2940.                 initialized, call ChangeMessage to display or change the
  2941.                 message line. AMessage is the initial message to display,
  2942.                 messages can only be displayed if AOptions includes
  2943.                 mfMessageLine.
  2944.  
  2945. Load            Constructor Load(var S: TStream);
  2946. ChangeMessage    Procedure ChangeMessage(AMessage: String);
  2947.  
  2948.                 Change the message displayed in the first row of the dialog
  2949.                 box. This method has no effect if mfMessageLine was not
  2950.                 included in the AOptions parameter passed to Init.
  2951.  
  2952. Execute         Function Execute: Word; Virtual;
  2953.  
  2954.                 Execute consists of a loop that calls the Process method you
  2955.                 have defined. At the bottom of the loop, RunState is checked
  2956.                 to see if execution should continue.
  2957.  
  2958.                 Repeat
  2959.                   GetEvent(Event);
  2960.                   HandleEvent(Event);
  2961.                   Process;
  2962.                 Until (RunState > cmContinueJob);
  2963.  
  2964. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  2965.  
  2966.                 Handles switching states of the dialog as buttons are
  2967.                 pressed. Whenever a button is pressed HandleEvent sets the
  2968.                 RunState field to the command of the pressed button.
  2969.  
  2970. Process         Procedure Process; Virtual;
  2971.  
  2972.                 You MUST ALWAYS override this method. In Process you will
  2973.                 include code to do the work. It must be able to do the work
  2974.                 in small chunks, so the dialog box can occasionally get
  2975.                 control back and check for user input. When processing is
  2976.                 done, set the RunState field to cmJobComplete.
  2977.  
  2978.                 Here is what a typical Process method might look like:
  2979.  
  2980.                 Case RunState of
  2981.                   cmStartJob : {DO SETUP}
  2982.                     ....     Do setup and set RunState to cmContinueJob.
  2983.                   cmContinueJob : {DO NEXT TASK}
  2984.                     ....     This might be a short loop, that does the work
  2985.                              in steps. If there is nothing left to do set
  2986.                              RunState to cmJobComplete.
  2987.                   cmPauseJob : {DO NOTHING}
  2988.                     ....
  2989.                   cmCancelJob : {SHUT DOWN, USER ABORTED}
  2990.                     ....
  2991.                 end;
  2992.  
  2993. Store           Procedure Store(var S: TStream);
  2994. See also    TDialog, cmXXXX constants, mfXXXX constants
  2995.  
  2996. TbxScrollDialog (TDialog)                                       TvScroll
  2997. ──────────────────────────────────────────────────────────────────────────────
  2998.                 TbxScrollDialog provides a scrolling dialog box for large
  2999.                 data entry forms. It contains a TGroup that provides the
  3000.                 clipping region needed for a scrolling interior. A
  3001.                 TbxScrollDialog can have vertical and horizontal scroll bars.
  3002.  
  3003.                 If it has the gfScrollXY bit set in its GrowMode field, any
  3004.                 view (TInputLines, TCheckBoxes, TStaticText, etc.) inserted
  3005.                 into a TbxScrollDialog can be scrolled. The dialog can be
  3006.                 scrolled with the scroll bars. It can also scroll as needed,
  3007.                 on Tab and mouse presses, to keep the focused subview in full
  3008.                 view.
  3009.  
  3010.                 To insert scrolling views into a TbxScrollDialog use
  3011.                 InsertToScroll instead of the standard Insert call.
  3012.                 InsertToScroll will set the gfScrollXY bit set in the
  3013.                 GrowMode field of the view.
  3014.  
  3015.                 You must also call SetLimit, to control the size of the
  3016.                 scrolling interior.
  3017.  
  3018. Fields ────────────────────────────────────────────────────────────────────
  3019. Limit           Limit : TPoint;
  3020.  
  3021.                 Holds the scrolling limits of the interior of the dialog.
  3022.  
  3023. VScrollBar    VScrollBar : PScrollBar;
  3024.  
  3025.                 Pointer to the vertical scroll bar.
  3026.  
  3027. HScrollBar    HScrollBar : PScrollBar;
  3028.  
  3029.                 Pointer to the horizontal scroll bar.
  3030.  
  3031. Interior    Interior : PbxScrollGroup;
  3032.  
  3033.                 Pointer to the scrolling interior group.
  3034.  
  3035. Methods ───────────────────────────────────────────────────────────────────
  3036. Init            Constructor Init(var Bounds: TRect; ATitle: String;
  3037.                                  ofFlag: Word);
  3038.  
  3039.                 Initializes the dialog, by creating scroll bars and the
  3040.                 interior scrolling group. Inserts the  covering background
  3041.                 view created by InitBackground into the scrolling interior.
  3042.  
  3043.                 The ofFlag parameter controls the creation of scroll bars.
  3044.                 Set ofFlag to ofHScrollbar and/or ofVScrollbar to create
  3045.                 vertical and/or horizontal scroll bars as needed. Remember to
  3046.                 call SetLimit to establish the size of the scrolling area in
  3047.                 the dialog box.
  3048.  
  3049. Load            Constructor Load(var S: TStream);
  3050. InitBackground    Function InitBackground: PView; Virtual;
  3051.  
  3052.                 Creates a blank covering view for the dialog background.
  3053.  
  3054. InsertToScroll    Procedure InsertToScroll(P: PView);
  3055.  
  3056.                 Inserts the view into the interior group and sets GrowMode to
  3057.                 include gfScrollXY.
  3058.  
  3059. AutoPosition    Procedure AutoPosition(Enable: Boolean);
  3060.  
  3061.                 Sets the AutoPos field of the interior. If Interior^.AutoPos
  3062.                 is True, then the dialog will scroll on Tab and mouse presses
  3063.                 to keep the current focused view displayed. AutoPos is True
  3064.                 by default.
  3065.  
  3066. SetLimit    Procedure SetLimit(X, Y: Integer);
  3067.  
  3068.                 Sets the size of the scrolling area. You MUST call SetLimit
  3069.                 or the dialog will not scroll.
  3070.  
  3071. Store           Procedure Store(var S: TStream);
  3072. See also    TbxScrollGroup, TbxScrollWindow, TDialog
  3073.  
  3074. TbxScrollGroup (TGroup)                                         TvScroll
  3075. ──────────────────────────────────────────────────────────────────────────────
  3076.                 TbxScrollGroup  serves as the Interior scrolling view for
  3077.                 TbxScrollDialog and TbxScrollWindow. It is created by those
  3078.                 objects and should never be directly accesed by your program.
  3079.                 TbxScrollGroup is the view that controls the scrolling of
  3080.                 subviews.
  3081.  
  3082. Fields ────────────────────────────────────────────────────────────────────
  3083. VScrollBar    VScrollBar : PScrollBar;
  3084.  
  3085.                 Pointer to a vertical scroll bar inserted in the parent view.
  3086.  
  3087. HScrollBar    HScrollBar : PScrollBar;
  3088.  
  3089.                 Pointer to a horizontal scroll bar inserted in the parent
  3090.                 view.
  3091.  
  3092. OldPos          OldPos : TPoint;
  3093.  
  3094.                 Holds the last position of the upper left corner of the
  3095.                 scrolling area.
  3096.  
  3097. AutoPos         AutoPos : Boolean;
  3098.  
  3099.                 If True then the current focused subview will be scrolled
  3100.                 into view on Tab and mouse presses in the subview.
  3101.  
  3102. Methods ───────────────────────────────────────────────────────────────────
  3103. Init            Constructor Init(var Bounds: TRect; AHScrollBar: PScrollBar;
  3104.                                  AVScrollBar: PScrollBar);
  3105.  
  3106.                 Bounds equals the full interior area of the parent view.
  3107.                 AHScrollBar and AVScrollBar are pointers to scroll bars
  3108.                 inserted into the parent view.
  3109.  
  3110. Load            Constructor Load(var S: TStream);
  3111. HandleEvent     Procedure HandleEvent(var Event: TEvent); Virtual;
  3112.  
  3113.                 Adjusts the subview positions as needed to implement the
  3114.                 scrolling view. Subview positions are always adjusted in
  3115.                 response to scroll bar changes. They will also be adjusted in
  3116.                 response to the tab key and mouse presses, if the AutoPos
  3117.                 flag is True.
  3118.  
  3119. Store           Procedure Store(var S: TStream);
  3120. See also    TbxScrollDialog, TbxScrollWindow, TGroup
  3121.  
  3122. TbxScrollInputLine (TInputLine)                                 TvScroll
  3123. ──────────────────────────────────────────────────────────────────────────────
  3124.                 TbxScrollInputLine overrides the default GetPalette to create
  3125.                 a TInputLine that can be inserted into a TWindow, or
  3126.                 descendant such as TbxScrollWindow. IT SHOULD NOT BE INSERTED
  3127.                 INTO A TbxScrollDialog.
  3128.  
  3129. Methods ───────────────────────────────────────────────────────────────────
  3130. GetPalette    Function GetPalette: PPalette; Virtual;
  3131.  
  3132.                 Returns a pointer the CScrollInputLine palette.
  3133. See also    TbxScrollWindow, TInputLine
  3134.  
  3135. TbxScrollView (TView)                                           TvScroll
  3136. ──────────────────────────────────────────────────────────────────────────────
  3137.                 This is the base object for creating new kinds of scrolling
  3138.                 views for TbxScrollDialogs and TbxScrollWindows. It is only
  3139.                 an abstract object and is not intended to be created
  3140.                 directly. It is included mostly as an example of what needs
  3141.                 to be done to create a scrolling, moveable, and resizeable
  3142.                 field in a scrolling window.
  3143.  
  3144. Methods ───────────────────────────────────────────────────────────────────
  3145. Init            Constructor Init(var Bounds: TRect);
  3146.  
  3147.                 Sets DragMode to dmDragMove and dmDragGrow,  the view is
  3148.                 moveable and resizeable. Sets EventMask to include
  3149.                 evBroadcast.
  3150.  
  3151. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  3152.  
  3153.                 Handles processing for resizing and moving the view.
  3154.                 HandleEvent begins dragging if a cmDragView command is
  3155.                 received, when the mouse is pressed and held on the top row
  3156.                 of the view (moving), or when the mouse is pressed and held
  3157.                 on the lower right corner (resizing). The DragMode mode field
  3158.                 controls the dragging behavior, i.e. whether the view can be
  3159.                 moved and/or resized.
  3160.  
  3161. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  3162.  
  3163.                 Processes the state changes needed to allow for moving and
  3164.                 resizing. Whenever AState includes sfDragging or sfActive the
  3165.                 view must be redrawn to have the correct frame and colors.
  3166. See also    TbxScrollDialog, TbxScrollWindow, TView
  3167.  
  3168. TbxScrollWindow (TbxWindow)                                     TvScroll
  3169. ──────────────────────────────────────────────────────────────────────────────
  3170.                 TbxScrollWindow is a window that is intended to have subviews
  3171.                 such as TInputLines inserted into it. It could be used to
  3172.                 create spreadsheet views, or form layout views. If a view has
  3173.                 the gfScrollXY bit set in its GrowMode field, it can be
  3174.                 scrolled in a TbxScrollWindow. The window can be scrolled
  3175.                 with the scroll bars, or can scroll as needed, on Tab and
  3176.                 mouse presses, to keep the focused subview in full view.
  3177.  
  3178.                 To insert scrolling views into a TbxScrollWindow, use
  3179.                 InsertToScroll instead of the standard Insert call.
  3180.                 InsertToScroll will set the gfScrollXY bit in the GrowMode
  3181.                 field of the view.
  3182.  
  3183.                 You must call SetLimit, to control the size of the scrolling
  3184.                 interior.
  3185.  
  3186. Fields ────────────────────────────────────────────────────────────────────
  3187. Limit           Limit : TPoint;
  3188.  
  3189.                 Holds the scrolling limits of the interior of the window.
  3190.  
  3191. VScrollBar    VScrollBar : PScrollBar;
  3192.  
  3193.                 Pointer to the vertical scroll bar.
  3194.  
  3195. HScrollBar    HScrollBar : PScrollBar;
  3196.  
  3197.                 Pointer to the horizontal scroll bar.
  3198.  
  3199. Interior    Interior : PbxScrollGroup;
  3200.  
  3201.                 Pointer to the scrolling interior group.
  3202.  
  3203. Methods ───────────────────────────────────────────────────────────────────
  3204. Init            Constructor Init(var Bounds: TRect; ATitle: String;
  3205.                                  ofFlag: Word);
  3206.  
  3207.                 Initializes the window, by creating scroll bars and the
  3208.                 interior scrolling group. Inserts the  covering background
  3209.                 view created by InitBackground into the scrolling interior.
  3210.  
  3211.                 The ofFlag parameter controls the creation of scroll bars.
  3212.                 Set ofFlag to ofHScrollbar and/or ofVScrollbar to create
  3213.                 vertical or horizontal scroll bars as needed. Remember to
  3214.                 call SetLimit to establish the size of the scrolling area in
  3215.                 the dialog box.
  3216.  
  3217. Load            Constructor Load(var S: TStream);
  3218. InitBackground    Function InitBackground: PView; Virtual;
  3219.  
  3220.                 Creates a blank covering view for the window background.
  3221.  
  3222. InsertToScroll    Procedure InsertToScroll(P: PView);
  3223.  
  3224.                 Inserts the view into the interior group and sets GrowMode to
  3225.                 include gfScrollXY.
  3226.  
  3227. AutoPosition    Procedure AutoPosition(Enable: Boolean);
  3228.  
  3229.                 Sets the AutoPos field of the interior. If Interior^.AutoPos
  3230.                 is True, then the window will scroll on Tab and mouse presses
  3231.                 to keep the current focused view displayed. AutoPos is True
  3232.                 by default.
  3233.  
  3234. SetLimit    Procedure SetLimit(X, Y: Integer);
  3235.  
  3236.                 Sets the size of the scrolling area. You MUST call SetLimit
  3237.                 or the window will not scroll.
  3238.  
  3239. Store           Procedure Store(var S: TStream);
  3240. See also    TbxScrollDialog, TbxScrollGroup, TbxScrollInputLine, TDialog
  3241.  
  3242. TbxSelectObject (TbxObject)                                     TvObjects
  3243. ──────────────────────────────────────────────────────────────────────────────
  3244.                 This object is be used with the TbxCheckListBox. It has a
  3245.                 Boolean field which saves the object's "Selected" state.
  3246.  
  3247. Fields ────────────────────────────────────────────────────────────────────
  3248. Selected    Selected : Boolean;
  3249.  
  3250.                 Records the "Selected" state of the object. It will be True
  3251.                 if the object is checked in a TbxCheckListBox.
  3252.  
  3253. Methods ───────────────────────────────────────────────────────────────────
  3254. Load            Constructor Load(var S: TStream);
  3255. GetSelect    Function GetSelect: Boolean; Virtual;
  3256.  
  3257.                 Returns the value of Selected.
  3258.  
  3259. SetSelect    Procedure SetSelect(AState: Boolean); Virtual;
  3260.  
  3261.                 Sets the value of Selected.
  3262.  
  3263. Store           Procedure Store(var S: TStream);
  3264. See also    TbxCheckListBox, TbxCollection, TbxObject, TObject
  3265.  
  3266. TbxSelectStr (TbxSelectObject)                                  TvObjects
  3267. ──────────────────────────────────────────────────────────────────────────────
  3268.                 TbxSelectStr is a descendant of TbxSelectObject to be used
  3269.                 for string records. TbxSelectStr can be used in the
  3270.                 collection of a TbxCheckListBox.
  3271.  
  3272. Fields ────────────────────────────────────────────────────────────────────
  3273. St              St: PString;
  3274.  
  3275.                 The stored string data.
  3276.  
  3277. Methods ───────────────────────────────────────────────────────────────────
  3278. Init            Constructor Init (const AString: String);
  3279.  
  3280.                 Uses NewStr to create a string to store AString.
  3281.  
  3282. Load            Constructor Load(var S: TStream);
  3283. Done            Destructor Done; Virtual;
  3284.  
  3285.                 Calls DisposeStr to free memory used to store the string.
  3286.  
  3287. GetText         Function GetText(MaxLen: Integer): String; Virtual;
  3288.  
  3289.                 Returns the first MaxLen characters from the string.
  3290.  
  3291. Store           Procedure Store(var S: TStream);
  3292. See also        TbxCheckListBox, TbxCollection, TbxObject, TbxSelectObject,
  3293.                 TObject
  3294.  
  3295. TbxSlider (TGroup)                                              TvInput
  3296. ──────────────────────────────────────────────────────────────────────────────
  3297.                 TbxSlider is a slider control created from a scroll bar.
  3298.                 Sliders are used to set a value that must be within a fixed
  3299.                 range. The "knob" on the slider is moved back and forth to
  3300.                 adjust the value. This version of the slider can only be
  3301.                 created horizontally.
  3302.  
  3303. Fields ────────────────────────────────────────────────────────────────────
  3304. ScrollBar    ScrollBar : PScrollBar;
  3305.  
  3306.                 Pointer to the scroll bar that serves as the slider.
  3307.  
  3308. ID              ID : Word;
  3309.  
  3310.                 Currently assigned id number. Id numbers are assigned
  3311.                 automatically by TbxEntryDialog.Insert. Id numbers must be
  3312.                 unique.
  3313.  
  3314. LLabel          LLabel : PLabel;
  3315.  
  3316.                 Pointer to the text label associated with the control.
  3317.  
  3318. EditFlags    EditFlags : Word;
  3319.  
  3320.                 Controls various options of the slider field.
  3321.  
  3322. Methods ───────────────────────────────────────────────────────────────────
  3323. Init            Constructor Init(var Bounds: TRect; AMin: Integer;
  3324.                                  AMax: Integer; const AMinLabel: String;
  3325.                                  const AMaxLabel: String);
  3326.  
  3327.                 AMin is the smallest value for the slider. AMax is the
  3328.                 largest value for the slider. AMinLabel is the label to
  3329.                 display at the "bottom" end of the slider. AMaxLabel is the
  3330.                 label to display at the "top" end of the slider. Bounds must
  3331.                 include an area large enough to include the min and max
  3332.                 labels.
  3333.  
  3334. Load            Constructor Load(var S: TStream);
  3335. AddLabel    Procedure AddLabel(ALabel: PLabel);
  3336.  
  3337.                 Associates a label with the slider. All labels should be
  3338.                 attached to their corresponding controls so that when the
  3339.                 control is locked the label can be locked too. Label text
  3340.                 will be used to construct the default error messages.
  3341.  
  3342. GetData         Procedure GetData(var Rec); Virtual;
  3343.  
  3344.                 Returns the current slider value as an integer in Rec.
  3345.  
  3346. GetID           Function GetID: Word;
  3347.  
  3348.                 Returns the ID number assigned to the slider.
  3349.  
  3350. GetFieldName    Function GetFieldName: String; Virtual;
  3351.  
  3352.                 Returns the field name. The default implementation returns
  3353.                 the text in the label pointed to by LLabel.
  3354.  
  3355. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  3356.  
  3357.                 Processes mouse clicks on the scroll bar. Handles events,
  3358.                 CmSetId and cmIdentify, for setting and getting the ID
  3359.                 number.
  3360.  
  3361. Lock            Procedure Lock;
  3362.  
  3363.                 Locks the field by executing SetState(sfDisabled, True).
  3364.  
  3365. SetData         Procedure SetData(var Rec); Virtual;
  3366.  
  3367.                 Sets the current slider value to the integer passed in Rec.
  3368.  
  3369. SetEditFlags    Procedure SetEditFlag(AFlag: Word; Enable: Boolean); Virtual;
  3370.  
  3371.                 Sets or clears bits in the EditFlag field. There are
  3372.                 currently no edit flags which affect the behavior of a
  3373.                 slider.
  3374.  
  3375. SetID           Procedure SetID(AFieldID: Word);
  3376.  
  3377.                 Sets ID to the value of AFieldID parameter.
  3378.  
  3379. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  3380.  
  3381.                 If AState contains sfDisabled, then SetState sets the scroll
  3382.                 bar and labels states to the same value of sfDisabled.
  3383.  
  3384. Store           Procedure Store(var S: TStream);
  3385. UnLock          Procedure UnLock;
  3386.  
  3387.                 Unlocks the field by executing SetState(sfDisabled, False).
  3388. See also    TbxEntryDialog, TGroup, TScrollBar
  3389.  
  3390. TbxSpinBar (TScrollBar)                                         TvInput
  3391. ──────────────────────────────────────────────────────────────────────────────
  3392.                 TbxSpinBar is scroll bar without the position indicator. It
  3393.                 is attached to a TbxSpinEdit control. A TbxSpinEdit control
  3394.                 is an integer input line. A TbxSpinBar is used to increase
  3395.                 and decrease the value of a TbxSpinEdit by fixed amounts. A
  3396.                 TbxSpinEdit may also be directly edited.
  3397.  
  3398. Fields ────────────────────────────────────────────────────────────────────
  3399. Chars           Chars: TbxSpinChars;
  3400.  
  3401.                 Characters used to draw the control.
  3402.  
  3403. SpinEdit    SpinEdit : PbxSpinEdit;
  3404.  
  3405.                 Pointer to the TbxSpinEdit control the spin bar is attached
  3406.                 to.
  3407.  
  3408. Methods ───────────────────────────────────────────────────────────────────
  3409. Init            Constructor Init(var Bounds: TRect);
  3410.  
  3411.                 Bounds can specify a vertical or horizontal spin control.
  3412.  
  3413. Load            Constructor Load(var S: TStream);
  3414. Draw            Procedure Draw; Virtual;
  3415.  
  3416.                 Overrides TScrollBar.Draw so just the arrows are drawn.
  3417.  
  3418. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  3419.  
  3420.                 Processes mouse presses on the arrows. For each mouse press,
  3421.                 Value is incremented or decremented by ArStep.
  3422.  
  3423. Store           Procedure Store(var S: TStream);
  3424. See also    TbxSpinEdit, TScrollBar
  3425.  
  3426. TbxSpinEdit (TbxIntegerEdit)                                    TvInput
  3427. ──────────────────────────────────────────────────────────────────────────────
  3428.                 TbxSpinEdit is an input line for integer values. It has a
  3429.                 TbxSpinBar attached that can be used to increment or
  3430.                 decrement the integer value by a fixed amount.
  3431.  
  3432. Fields ────────────────────────────────────────────────────────────────────
  3433. SpinBar         SpinBar : PbxSpinBar;
  3434.  
  3435.                 Pointer to the spin bar control.
  3436.  
  3437. Methods ───────────────────────────────────────────────────────────────────
  3438. Init            Constructor Init(var Bounds: TRect; const AMask: String;
  3439.                                  ASpinBar: PbxSpinBar);
  3440.  
  3441.                 The AMask parameter can be anything that would work with a
  3442.                 normal TbxIntegerEdit. ASpinBar must point to a valid
  3443.                 TbxSpinBar, IT CANNOT BE NIL.
  3444.  
  3445. Load            Constructor Load(var S: TStream);
  3446. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  3447.  
  3448.                 Processes cmScrollBarChanged events from SpinBar by setting
  3449.                 the current value to SpinBar^.Value.
  3450.  
  3451. SetData         Procedure SetData(var Rec); Virtual;
  3452.  
  3453.                 Sets the current value of the input line and calls
  3454.                 SpinBar^.SetValue to set the spin bar value.
  3455.  
  3456. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  3457. Valid           Function Valid(Command: Word): Boolean; Virtual;
  3458.  
  3459.                 Validates the current value against SpinBar^.Min and
  3460.                 SpinBar^.Max.
  3461. See also    TbxIntegerEdit, TbxSpinBar, TInputLine
  3462.  
  3463. TbxTextWindow (TbxWindow)                                       TvViews
  3464. ──────────────────────────────────────────────────────────────────────────────
  3465.                 TbxTextWindow is a window that contains an instance of
  3466.                 TTerminal for instant text display capabilities. If you need
  3467.                 a quick text display window, but don't want the bother of
  3468.                 defining a Draw method, just slap one of these into the
  3469.                 desktop. Call the Write method with any strings you want to
  3470.                 display.
  3471.  
  3472.                 Alternately, you can create a cmDisplayStr broadcast event
  3473.                 with a string pointer in the InfoPtr field. The string will
  3474.                 be displayed in any open TbxTextWindow on the desktop.
  3475.  
  3476. Fields ────────────────────────────────────────────────────────────────────
  3477. Interior    Interior  : PTerminal;
  3478.  
  3479.                 Pointer to the window's TTerminal subview.
  3480.  
  3481. HScrollBar    HScrollBar : PScrollBar;
  3482.  
  3483.                 Pointer to the horizontal scroll bar.
  3484.  
  3485. VScrollBar    VScrollBar : PScrollBar;
  3486.  
  3487.                 Pointer to the vertical scroll bar.
  3488.  
  3489. Width           Width : Byte;
  3490.  
  3491.                 Maximum display width of the window. Extra characters from
  3492.                 any line longer than Width will be wrapped to the next line.
  3493.  
  3494. Height          Height : Byte;
  3495.  
  3496.                 Maximum number of lines in the view.
  3497.  
  3498. Methods ───────────────────────────────────────────────────────────────────
  3499. Init            Constructor Init(Bounds: TRect; WinTitle: String;
  3500.                                  WinNumber: Word; AOptions: Word;
  3501.                                  AMaxLines: Word);
  3502.  
  3503.                 Pass ofVScrollBar and/or ofHScrollBar in AOptions, if you
  3504.                 want scroll bars with the window. Height is set to the
  3505.                 AMaxLines parameter. Width is set to the desktop width.
  3506.                 Width * Height is the maximum numbers of characters in the
  3507.                 buffer at one time.
  3508.  
  3509. Load        Constructor Load(var S: TStream);
  3510. Clear        Procedure Clear;
  3511.  
  3512.                 Clears the display and buffer. You can also clear the window
  3513.                 by generating a  cmDisplayClr broadcast event.
  3514.  
  3515. HandleEvent        Procedure HandleEvent(var Event: TEvent); Virtual;
  3516.  
  3517.                 Processes broadcast events cmDisplayStr and cmDisplayClr.
  3518.  
  3519. Store        Procedure Store(var S: TStream);
  3520. Write        Procedure Write(St: String);
  3521.  
  3522.                 Calls TTerminal.WriteStr to display the string. Displays any
  3523.                 characters beyond Width on the next line.
  3524. See also    TTerminal, TWindow, TbxWindow
  3525.  
  3526. TbxUnsortedStringCollection (TStringCollection)                 TvObjects
  3527. ──────────────────────────────────────────────────────────────────────────────
  3528.                 The TbxUnsortedStringCollection stores strings in unsorted
  3529.                 order. Each string is stored in the order it was inserted
  3530.                 into the collection.
  3531.  
  3532. Methods ───────────────────────────────────────────────────────────────────
  3533. Insert          Procedure Insert(Item: Pointer); Virtual;
  3534.  
  3535.                 Does an AtInsert(Count, Item) to insert the string at the end
  3536.                 of the list.
  3537. See also    TCollection, TStringCollection
  3538.  
  3539. TbxVListBox (TListBox)                                          TvDialog
  3540. ──────────────────────────────────────────────────────────────────────────────
  3541.                 Note : In the following descriptions the generic term FILE is
  3542.                 used in reference to any sort of large ordered list of
  3543.                 records that is too large to fit into memory. The actual list
  3544.                 may or may not be stored in a disk file. It is recommended
  3545.                 that you thoroughly understand the use of the normal list box
  3546.                 and its collection before trying to use the TbxVListBox.
  3547.  
  3548.                 A normal list box can only display collections of up to 16K
  3549.                 items, and are not very good for large databases.
  3550.                 TbxVListBoxes can display FILES of any size. Virtual list
  3551.                 boxes allow complete freedom of movement in the FILE. Virtual
  3552.                 list boxes work by storing only a small portion of the FILE
  3553.                 in memory. To create a virtual list box, you must derive a
  3554.                 new object from TbxVListBox that is able to move through and
  3555.                 fetch items from the FILE.
  3556.  
  3557.                 In the derived list box you MUST override GetItem, you will
  3558.                 probably override MatchItem, and you may override the
  3559.                 PageSize method. GetItem provides page by page movement
  3560.                 through a FILE. TbxVListBox will not function unless you
  3561.                 supply a GetItem method that works with your specific data.
  3562.                 MatchItem searches for a particular item in a FILE. PageSize
  3563.                 sets the size of the virtual paging through the FILE.
  3564.  
  3565.                 In addition to overriding GetItem, you must do the original
  3566.                 fill of the list box collection. This first fill will set the
  3567.                 maximum collection size, so put an optimum number of items in
  3568.                 it. After the list box has been initialized, create a new
  3569.                 collection for the list box, fill it from the FILE, and call
  3570.                 NewList to add the collection to the list box. Once you have
  3571.                 setup the initial list box collection, TbxVListBox will
  3572.                 handle the rest.
  3573.  
  3574.                 One drawback to virtual list boxes is that the vertical
  3575.                 scroll bar does not indicate a relative position in the FILE.
  3576.                 The scroll bars only indicate the position in the current
  3577.                 data stored in memory. However; there are flags that indicate
  3578.                 when the top or bottom of the FILE has been reached.
  3579.  
  3580. Fields ────────────────────────────────────────────────────────────────────
  3581. AtMin           AtMin : Boolean;
  3582.  
  3583.                 At the top of the FILE? This flag can be examined to see if
  3584.                 movement before the start of the current list in memory is
  3585.                 possible.
  3586.  
  3587. AtMax           AtMax : Boolean;
  3588.  
  3589.                 At the bottom of the FILE? This flag can be examined to see
  3590.                 if movement past the end of the current list in memory is
  3591.                 possible.
  3592.  
  3593. Methods ───────────────────────────────────────────────────────────────────
  3594. Init            Constructor Init(Bounds: TRect; ANumCols: Word;
  3595.                                  AHScrollBar: PScrollBar;
  3596.                                  AVScrollBar: PScrollBar);
  3597.  
  3598.                 This is the same interface as the standard Init. After
  3599.                 calling the inherited Init, it sets AtMin and AtMax to
  3600.                 False. Also calls SetComandState to disable the cmPrevPage,
  3601.                 cmNextPage, cmFirstPage, and cmLastPage global commands.
  3602.  
  3603.                 After the list box is initialized, you must fill it.
  3604.                 Create and fill a collection with data, then call
  3605.                 NewList to add it to the list box. You should set the
  3606.                 collection size to some optimum value, as the initial size is
  3607.                 the largest the list will ever be. You should also set the
  3608.                 AtMax and AtMin flags.
  3609.  
  3610.                 After the list box is filled initially, TbxVListBox will
  3611.                 handle any subsquent changes.
  3612.  
  3613. Load            Constructor Load(var S: TStream);
  3614. FillByPage    Function FillByPage(Forward : Boolean): Integer; Virtual;
  3615.  
  3616.                 Adds a new page of items to the top or bottom of the list
  3617.                 box. FillByPage is called whenever a cmPrevPage or cmNextPage
  3618.                 command is received by HandleEvent. New items are appended
  3619.                 after the last item in the list box, if Forward is True. If
  3620.                 Forward is False, items are inserted in front of the first
  3621.                 item in the list box. In other words; items are added from
  3622.                 the top up, or the bottom down. As each new item is inserted,
  3623.                 one existing item is deleted from the opposite end of the
  3624.                 list box.
  3625.  
  3626.                 FillByPage calls GetItem to retrieve each item from the FILE.
  3627.                 It inserts items into the list box until GetItem returns nil
  3628.                 or PageSize items have been inserted. If fewer than PageSize
  3629.                 items are added, either the AtMin or AtMax flag will be set
  3630.                 to True, depending on the direction of the fill. FillByPage
  3631.                 returns the number of items inserted into the list.
  3632.  
  3633. FillFrom        Function FillFrom(FromTop : Boolean): Integer; Virtual;
  3634.  
  3635.                 Fills the list box from the top or bottom of the FILE.
  3636.                 FillFrom is called by HandleEvent whenever a cmLastPage or
  3637.                 cmFirstPage command is received. In other words, FillFrom is
  3638.                 called to move to the top or bottom of the FILE. The FromTop
  3639.                 parameter specifies the start position and direction of the
  3640.                 fill. If FromTop is True, the list box is filled downward
  3641.                 from the top of the FILE. If it is False, the list box is
  3642.                 filled upward from the bottom of the FILE. Before any new
  3643.                 items are inserted, all existing items are deleted from list
  3644.                 box by calling List^.FreeAll.
  3645.  
  3646.                 FillFrom calls GetItem to retrieve each item from the FILE.
  3647.                 It inserts items into the list box until GetItem returns nil
  3648.                 or List^.Limit is reached. If fewer than PageSize items are
  3649.                 added, either the AtMin or AtMax flag will be set to True,
  3650.                 depending on the direction of the fill. FillFrom returns the
  3651.                 number of items inserted into the list.
  3652.  
  3653. FocusItem    Procedure FocusItem(Item : Integer); Virtual;
  3654.  
  3655.                 Calls the inherited FocusItem then redraws the list box.
  3656.  
  3657. GetItem         Function GetItem(ACommand : Word): PObject; Virtual;
  3658.  
  3659.                 You MUST override GetItem in all your derived objects. This
  3660.                 method reads the FILE and returns a pointer to the next item
  3661.                 that will be inserted into the list box. The list box will
  3662.                 not function without this method.
  3663.  
  3664.                 GetItem first establishes a new position in the FILE. The new
  3665.                 FILE position is indicated by ACommand. ACommand will be a
  3666.                 value such as vlNext or vlPrev, which mean move to the next
  3667.                 or previous item in the FILE. The current FILE position just
  3668.                 established must be preserved between calls to GetItem.
  3669.  
  3670.                 If the correct file position can be established, GetItem
  3671.                 returns a pointer to the new item. The pointer is to an
  3672.                 object of the same type as in the list box collection, so
  3673.                 that it can be inserted into the list box collection. If
  3674.                 ACommand cannot be executed, say vlNext while already at the
  3675.                 end of the FILE, then a nil pointer is returned.
  3676.  
  3677.                 The following commands may be passed to GetItem :
  3678.  
  3679.                 Command         Meaning
  3680.                 vlMin           Move to first item in file, return a pointer
  3681.                                 to it.
  3682.                 vlMax           Move to last item in file, return a pointer
  3683.                                 to it.
  3684.                 vlCurrent       Return a pointer to the current item in the
  3685.                                 file.
  3686.                 vlNext          Advance to the next item in the file, return
  3687.                                 a pointer to it.
  3688.                 vlPrev          Move to the previous item in the file, return
  3689.                                 a pointer to it.
  3690.                 vlListMax       Move to the item in the file that matches the
  3691.                                 first item in the list box, and return a
  3692.                                 pointer to it.
  3693.                 vlListMin       Move to the item in the file that matches the
  3694.                                 last item in the list box, and return a
  3695.                                 pointer to it.
  3696.  
  3697. HandleEvent     Procedure HandleEvent(var Event : TEvent); Virtual;
  3698.  
  3699.                 Handles cmPrevPage, cmNextPage, cmFirstPage, and cmLastPage
  3700.                 commands for list movement. These commands are global and may
  3701.                 be generated by your program. One way to allow paging through
  3702.                 an entire FILE would be to create a dialog box with Page Up,
  3703.                 Page Down, Go To First Record, and Go To Last Record buttons.
  3704.                 The commands cmPrevPage, cmNextPage, cmFirstPage, and
  3705.                 cmLastPage are enabled and disabled by the collection fill
  3706.                 methods according to the state of the AtMin and AtMax flags.
  3707.  
  3708. Lookup          Function Lookup(P : PObject): Boolean; Virtual;
  3709.  
  3710.                 LookUp provides a means for searching the FILE for a
  3711.                 specified item and displaying the results. LookUp calls
  3712.                 MatchItem to do the searching. The P parameter is a pointer
  3713.                 to the object to you want to search for. P is the same object
  3714.                 type as returned by GetItem and as in the list box
  3715.                 collection.
  3716.  
  3717.                 LookUp, returns True if the item pointed by P is found. If P
  3718.                 is found, LookUp refills the list box starting from the
  3719.                 matching item, focuses the first item, and redraws the list
  3720.                 box.
  3721.  
  3722. MatchItem    Function MatchItem(P : PObject): Boolean; Virtual;
  3723.  
  3724.                 MatchItem searches the entire FILE (not just that portion
  3725.                 stored in memory), to find a match for the item pointed to by
  3726.                 P. P is the same object type as in the list box collection
  3727.                 and the same type returned by the GetItem method.
  3728.  
  3729.                 If a match is found, MatchItem must set the current position
  3730.                 in the FILE to the position of the matching item. MatchItem
  3731.                 returns True if a match is found and False otherwise. The
  3732.                 default MatchItem method always returns False.
  3733.  
  3734.                 When no match is found, MatchItem may set up a closest match.
  3735.                 In that case it would always return True and MatchItem would
  3736.                 set the current position in the FILE to the closest matching
  3737.                 item.
  3738.  
  3739. NewList         Procedure NewList(AList: PCollection); Virtual;
  3740.  
  3741.                 Inserts the collection pointed to by AList into the list box.
  3742.                 Sets the enabled state of the cmNextPage, cmLastPage,
  3743.                 cmPrevPage, and cmFirstPage global commands.
  3744.  
  3745. PageSize    Function PageSize : Integer; Virtual;
  3746.  
  3747.                 This method returns the virtual page size for movement in the
  3748.                 list. The default value returned is List^.Limit DIV 3. You
  3749.                 may want to override to allow a large page size when stepping
  3750.                 through the file.
  3751.  
  3752. SetCommandState Procedure SetCommandState(Enable : Boolean);
  3753.  
  3754.                 Set the state of the cmNextPage, cmLastPage, cmPrevPage, and
  3755.                 cmFirstPage global commands according to the values of AtMin,
  3756.                 AtMax, and the Enable parameter.
  3757. See also    TCollection, TListBox
  3758.  
  3759. TbxWindow (TWindow)                                             TvViews
  3760. ──────────────────────────────────────────────────────────────────────────────
  3761.                 TbxWindow is a window that can be minimized (displayed as an
  3762.                 icon). TbxWindow also has a popup control menu. The control
  3763.                 menu can be displayed by pressing Alt-Minus or clicking the
  3764.                 right mouse button on the close icon.
  3765.  
  3766. Fields ────────────────────────────────────────────────────────────────────
  3767. MinMax          MinMax : PbxMinMaxButton;
  3768.  
  3769.                 Pointer to the minimize icon in the window frame.
  3770.  
  3771. Icon            Icon : PbxWindowIcon;
  3772.  
  3773.                 Pointer to the view (icon) that displays when the window is
  3774.                 minimized.
  3775.  
  3776. Methods ───────────────────────────────────────────────────────────────────
  3777. Init            Constructor Init(var Bounds: TRect; ATitle: TTitleStr;
  3778.                                  ANumber: Integer);
  3779.  
  3780.                 Calls TWindow.Init passing Bounds, ATitle, and ANumber.
  3781.                 Inserts a minimize icon into the window frame. Calls the
  3782.                 InitIcon method to create the icon that will display on the
  3783.                 desktop when the window is minimized. Inserts the view
  3784.                 returned by InitIcon into the desktop.
  3785.  
  3786. Load            Constructor Load(var S: TStream);
  3787. ControlMenu    Procedure ControlMenu(Mouse: Boolean);
  3788.  
  3789.                 Pops the window control menu. Mouse indicates whether the
  3790.                 menu is popping up because of a right mouse button press on
  3791.                 the window close icon. The control menu contains the
  3792.                 following options :  "Close", "Zoom", "Minimize", "Previous",
  3793.                 "Next", "Resize/move", "Tile", and "Cascade".
  3794.  
  3795. HandleEvent        Procedure HandleEvent(var Event: TEvent); Virtual;
  3796.  
  3797.                 Handles the kbAltMinus and cmPopMenu commands that popup the
  3798.                 control menu. Minimizes the window to an icon whenever a
  3799.                 cmMinimize command is received.
  3800.  
  3801. InitFrame        Procedure InitFrame; Virtual;
  3802.  
  3803.                 Overrides the default InitFrame to setup a TbxFrame that can
  3804.                 respond to mouse presses on the minimize icon in the upper
  3805.                 right corner of the frame.
  3806.  
  3807. InitIcon        Procedure InitIcon; Virtual;
  3808.  
  3809.                 Creates a default icon that displays on the desktop when the
  3810.                 window is minimized. The default icon consists of the window
  3811.                 title.
  3812.  
  3813. SetState        Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  3814.  
  3815.                 Overrides the default method to provide special handling for
  3816.                 the control menu and the minimize icon. SetState hides and
  3817.                 shows the minimize icon in response to setting sfActive. It
  3818.                 also enables the cmMinimize command whenever the window is
  3819.                 active.
  3820.  
  3821. Store           Procedure Store(var S: TStream);
  3822. See also        TbxFrame, TbxIcon, TbxMinMaxButton, TbxWindowIcon, TWindow
  3823.  
  3824. TbxWindowIcon (TbxIcon)                                         TvViews
  3825. ──────────────────────────────────────────────────────────────────────────────
  3826.                 Provides an icon for a minimized TbxWindow. Icons can be
  3827.                 maximized by double clicking on the icon. They can also be
  3828.                 maximized from the control menu popped up by pressing
  3829.                 Alt-Minus.
  3830.  
  3831. Fields ────────────────────────────────────────────────────────────────────
  3832. View            View  : PView;
  3833.  
  3834.                 Pointer to the maximized window.
  3835.  
  3836. Methods ───────────────────────────────────────────────────────────────────
  3837. Init            Constructor Init(ATitle: TTitleStr; AView: PView);
  3838.  
  3839.                 ATitle is the title of the icon, and is displayed as the
  3840.                 default icon view. AView is a pointer to the maximized
  3841.                 window.
  3842.  
  3843. Load            Constructor Load(var S: TStream);
  3844. ControlMenu    Procedure ControlMenu(Mouse: Boolean);
  3845.  
  3846.                 Pops the window control menu. Mouse indicates whether the
  3847.                 menu is popping up because of a right mouse button press on
  3848.                 the icon. The control menu contains the following options :
  3849.                 "Close", "Maximize", "Previous", "Next", and "Move".
  3850.  
  3851. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  3852.  
  3853.                 Handles the kbAltMinus and cmPopMenu commands that popup the
  3854.                 control menu. Maximizes the window and hides the icon
  3855.                 whenever a cmMaximize command is seen. Also handles double
  3856.                 mouse clicks, that zoom the window, on the icon.
  3857.  
  3858. SetState    Procedure SetState(AState: Word; Enable: Boolean); Virtual;
  3859.  
  3860.                 Whenever the icon is activated SetState enables the commands
  3861.                 cmClose, cmMinimize, cmResize, cmNext, and cmPrev.
  3862.  
  3863. Store           Procedure Store(var S: TStream);
  3864. See also    TbxIcon, TbxWindow
  3865.  
  3866. TbxWordEdit (TbxLongEdit)                                       TvInput
  3867. ──────────────────────────────────────────────────────────────────────────────
  3868.                 A descendant of TbxLongEdit for Words.
  3869.  
  3870. Methods ───────────────────────────────────────────────────────────────────
  3871. Init            Constructor Init(var Bounds: TRect; const AMask: String;
  3872.                                  AMin: Byte; AMax: Byte);
  3873.  
  3874.                 The Init constructor exists mainly to provide range checking
  3875.                 of the AMin and AMax parameters. Calls the TbxLongEdit.Init
  3876.                 constructor. AMask defines a picture that controls what
  3877.                 characters may be entered. AMask can contain literal
  3878.                 characterss as well as digit place holders. Two characters
  3879.                 can be used for indicating digits, '#' and '9'. The '9'
  3880.                 allows the entry of digits 0 through 9, while the '#' also
  3881.                 allows entry of a minus sign.
  3882.  
  3883. DataSize    Function DataSize: Word; Virtual;
  3884.  
  3885.                 Returns the size of an Integer.
  3886.  
  3887. GetData         Procedure GetData(var Rec); Virtual;
  3888.  
  3889.                 Returns the current value as an Integer in Rec.
  3890.  
  3891. SetData         Procedure SetData(var Rec); Virtual;
  3892.  
  3893.                 Set the current value to the Word value in Rec.
  3894. See also    TbxEditLine, TbxLongEdit, TInputLine
  3895.  
  3896. Tbx3DButton (TButton)                                           Tv3D
  3897. ──────────────────────────────────────────────────────────────────────────────
  3898.                 A Tbx3DButton implements the same behavior as a TButton but
  3899.                 is displayed in a three dimensional style. Unlike normal
  3900.                 buttons, 3D buttons accept up to two rows of text. In the
  3901.                 title string just insert a ^M in front of the text for second
  3902.                 row.
  3903.  
  3904.                 For more information please see the entry for TButton in the
  3905.                 Turbo Vision manual.
  3906.  
  3907. Fields ────────────────────────────────────────────────────────────────────
  3908. Down            Down : Boolean;
  3909.  
  3910.                 Tracks the "pressed" state of the button.
  3911.  
  3912. Methods ───────────────────────────────────────────────────────────────────
  3913. Init            Constructor Init(var Bounds: TRect; ATitle:
  3914.                                  TTitleStr; ACommand: Word; AFlags: Word);
  3915.  
  3916.                 Creates a button with the given bounds and title string by
  3917.                 calling TButton.Init. A 3D button title can be one or two
  3918.                 rows of text, the second row of the title must start with a
  3919.                 ^M.
  3920.  
  3921.                 Init(R, 'Save' + ^M + 'File', ....), will create a two line
  3922.                 button with a title of "Save File" displayed on two lines.
  3923.  
  3924. Load            Constructor Load(var S: TStream);
  3925. Draw            Procedure Draw; Virtual;
  3926.  
  3927.                 Overrides TButton.Draw to display a one or two line 3D
  3928.                 button. Draws the button with the palette and outline
  3929.                 (returned by GetFrame) appropriate for the current state.
  3930.  
  3931. DrawTitle       Procedure DrawTitle(ATitle: TTitleStr; Color: Word;
  3932.                                     Row: Word); Virtual;
  3933.  
  3934.                 Called by Draw to display the button title.
  3935.  
  3936. GetFrame    Procedure GetFrame(var F: TbxFrameArray); Virtual;
  3937.  
  3938.                 Returns the set of frame characters to be used to draw the 3D
  3939.                 outline for the button. If Down is True then the ButtonPress
  3940.                 frame is returned. If the button is selected but not pressed,
  3941.                 the ButtonSelect frame is returned. Otherwise, the
  3942.                 ButtonNormal frame is returned. This method can be overridden
  3943.                 to change the outline frame styles.
  3944.  
  3945. GetPalette    Function GetPalette: PPalette; Virtual;
  3946.  
  3947.                 Returns a pointer to the default palette C3DButton.
  3948.  
  3949. HandleEvent    Procedure HandleEvent(var Event: TEvent); Virtual;
  3950.  
  3951.                 Overrides the TButton.HandleEvent so the button can be drawn
  3952.                 in 3D styles appropriate to the current button state.
  3953. See also        ButtonNormal, ButtonPress, ButtonSelect, TButton
  3954.  
  3955. Tbx3DDialog (TDialog)                                           Tv3D
  3956. ──────────────────────────────────────────────────────────────────────────────
  3957.                 Tbx3DDialog replaces TDialog so all controls can be displayed
  3958.                 with a 3D effect. All controls will have a 3D outline added
  3959.                 if the ofFramed bit in the Options flag is set when they are
  3960.                 inserted into the dialog. You should only set the ofFramed
  3961.                 bit for controls like input lines and list boxes which do not
  3962.                 have specific 3D versions. Do not set the ofFramed bit on
  3963.                 Tbx3DButton or Tbx3DHistory objects.
  3964.  
  3965. Methods ───────────────────────────────────────────────────────────────────
  3966. GetPalette    Function GetPalette: PPalette; Virtual;
  3967.  
  3968.                 Returns a pointer to the default palette C3DDialog.
  3969.  
  3970. Insert          Procedure Insert(P: PView); Virtual;
  3971.  
  3972.                 If the Options field of the view has the ofFramed bit set, an
  3973.                 outline object (with bounds one larger in each dimension) is
  3974.                 inserted into the dialog before the view. When inserting a
  3975.                 view that will be outlined make sure to position the view to
  3976.                 allow room for the outline.
  3977. See also    Tbx3DOutline, TDialog
  3978.  
  3979. Tbx3DHistory (THistory)                                         Tv3D
  3980. ──────────────────────────────────────────────────────────────────────────────
  3981.                 Tbx3DHistory replaces THistory with a history list arrow
  3982.                 button with a 3D look. This object implements all features of
  3983.                 the standard THistory object.
  3984.  
  3985. Methods ───────────────────────────────────────────────────────────────────
  3986. Init            Constructor Init(var Bounds: TRect; ALink: PInputLine;
  3987.                                  AHistoryId: Word);
  3988.  
  3989.                 Use the same bounds you would for a normal THistory view,
  3990.                 they will be changed to accommodate the 3D effect.
  3991.  
  3992. Draw            Procedure Draw; Virtual;
  3993.  
  3994.                 Draws a 3D history button with a single line frame.
  3995.  
  3996. GetPalette    Function GetPalette: PPalette; Virtual;
  3997.  
  3998.                 Returns a pointer to the default palette C3DHistory.
  3999. See also    THistory
  4000.  
  4001. Tbx3DOutline (TView)                                            Tv3D
  4002. ──────────────────────────────────────────────────────────────────────────────
  4003.                 Tbx3DOutline is used to give controls, such as input lines
  4004.                 and list boxes, a 3D look when inserted into a 3D dialog. Any
  4005.                 view that has its ofFramed bit set, when inserted into a
  4006.                 Tbx3DDialog will get an outline. See Tbx3DDialog for more
  4007.                 information.
  4008.  
  4009. Methods ───────────────────────────────────────────────────────────────────
  4010. Init            Constructor Init(var Bounds: TRect);
  4011.  
  4012.                 Grows Bounds by one in all directions and calls TView.Init to
  4013.                 create the object.
  4014.  
  4015. Draw            Procedure Draw; Virtual;
  4016.  
  4017.                 Draws an outline with the frame characters returned by
  4018.                 GetFrame.
  4019.  
  4020. GetFrame    Procedure GetFrame(var F: TbxFrameArray); Virtual;
  4021.  
  4022.                 Returns the frame characters to be used to draw the 3D
  4023.                 outline. This method can be overridden to change the outline
  4024.                 style.
  4025.  
  4026. GetPalette    Function GetPalette: PPalette; Virtual;
  4027.  
  4028.                 Returns a pointer to the default palette C3DOutline.
  4029. See also    Tbx3DDialog, TView
  4030.  
  4031. Tbx3DToolBar (Tbx3DDialog)                                      Tv3D
  4032. ──────────────────────────────────────────────────────────────────────────────
  4033.                 The Tbx3DToolBar implements a 3D tool/button bar using
  4034.                 Tbx3DToolButtons. Tool bars are really just modeless dialogs
  4035.                 that can't be selected or closed. The default tool bar has no
  4036.                 frame and cannot be moved, this can be changed by overriding
  4037.                 the InitFrame method.
  4038.  
  4039.                 Tool bars can be vertical or horizontal and grow as needed to
  4040.                 hold more buttons. The starting bounds of a tool bar specify
  4041.                 only the upper left corner. Buttons are added to the tool bar
  4042.                 by calling AddTool, passing the button title and command id.
  4043.  
  4044.                 Tool bars respond only to mouse presses. Tool bars by
  4045.                 themselves do no processing. When a button on the tool bar is
  4046.                 pressed the associated command is broadcast throughout the
  4047.                 application. Your application's HandleEvent method must be
  4048.                 changed to receive these broadcast messages and implement any
  4049.                 desired behavior.
  4050.  
  4051.                 Tool bars are inserted directly into the desktop and MUST BE
  4052.                 THE FIRST OBJECT INSERTED INTO THE DESKTOP! It is probably
  4053.                 best to create a new InitDesktop method for your application
  4054.                 and create a tool bar immediately after calling the inherited
  4055.                 InitDesktop method.
  4056.  
  4057. Fields ────────────────────────────────────────────────────────────────────
  4058. IsVertical    IsVertical: Boolean;
  4059.  
  4060.                 Is the tool bar display vertical or horizontal. Do not change
  4061.                 this after the bar is initialized!
  4062.  
  4063. LastX           LastX: Word;
  4064.  
  4065.                 The last X coordinates used by a button.
  4066.  
  4067. LastY           LastY: Word;
  4068.  
  4069.                 The last Y coordinates used by a button.
  4070.  
  4071. Methods ───────────────────────────────────────────────────────────────────
  4072. Init            Constructor Init(var Bounds: TRect; Vertical: Boolean);
  4073.  
  4074.                 Calls Tbx3Dialog.Init to create a 3D dialog. Default flags
  4075.                 are ofTileable, ofSelectable, sfShadow and wfClose off, and
  4076.                 ofFirstClick on. If there is no frame, the dialog bounds are
  4077.                 decreased by one.
  4078.  
  4079. Load            Constructor Load(var S: TStream);
  4080. AddTool         Procedure AddTool(ATitle: TTitleStr; ACommand: Word);
  4081.  
  4082.                 Add a button to the tool bar. ATitle is the text displayed on
  4083.                 the button, ACommand is the command id that will be broadcast
  4084.                 whenever the button is pressed. Titles may be one or two
  4085.                 lines, insert a ^M in front of text for the second line.
  4086.  
  4087. InitFrame    Procedure InitFrame; Virtual;
  4088.  
  4089.                 Overrides the TDialog.InitFrame and sets the frame pointer to
  4090.                 nil.
  4091.  
  4092. SizeLimits    Procedure SizeLimits(var Min, Max: TPoint); Virtual;
  4093.  
  4094.                 Overrides TDialog.SizeLimits to keep the tool bar from being
  4095.                 resized.
  4096.  
  4097. Store           Procedure Store(var S: TStream);
  4098. See also    Tbx3DDialog, Tbx3DToolButton
  4099.  
  4100. Tbx3DToolButton (Tbx3DButton)                                   Tv3D
  4101. ──────────────────────────────────────────────────────────────────────────────
  4102.                 3D buttons for tool bars. A special toolbar button was
  4103.                 created to give these buttons an appropriate outline.
  4104.  
  4105. Methods ───────────────────────────────────────────────────────────────────
  4106. GetFrame    Procedure GetFrame(var F: TbxFrameArray); Virtual;
  4107.  
  4108.                 Returns the frame characters to be used to draw the 3D
  4109.                 outline. A tool button only has two states Down or Up, and
  4110.                 only two frame styles. This method can be overridden to change
  4111.                 the outline style.
  4112.  
  4113. GetPalette    Function GetPalette: PPalette; Virtual;
  4114.  
  4115.                 Returns a pointer to the default palette C3DToolButton.
  4116. See also    Tbx3DButton, Tbx3DToolBar, TButton
  4117.  
  4118. Trim procedure                                                  TvString
  4119. ──────────────────────────────────────────────────────────────────────────────
  4120. Declaration    Procedure Trim(var S: String);
  4121. Function    Return string S with leading and trailing blanks removed.
  4122. See also    FTrim
  4123.  
  4124. TrimCh procedure                                                TvString
  4125. ──────────────────────────────────────────────────────────────────────────────
  4126. Declaration    Procedure TrimCh(var S: String; Ch: Char);
  4127. Function        Return string S with all leading and trailing characters
  4128.                 equal to Ch removed.
  4129. See also    FTrimCh
  4130.  
  4131. TrimLead procedure                                              TvString
  4132. ──────────────────────────────────────────────────────────────────────────────
  4133. Declaration    Procedure TrimLead(var S: String);
  4134. Function    Return string S with leading spaces removed.
  4135. See also    FTrimLead
  4136.  
  4137. TrimLeadZero procedure                                          TvString
  4138. ──────────────────────────────────────────────────────────────────────────────
  4139. Declaration    Procedure TrimLeadZero(var S: String);
  4140. Function    Return string S with leading zeros removed.
  4141. See also    FTrimLeadZero
  4142.  
  4143. TrimTrail procedure                                             TvString
  4144. ──────────────────────────────────────────────────────────────────────────────
  4145. Declaration    Procedure TrimTrail(var S: String);
  4146. Function    Return string S with trailing spaces removed.
  4147. See also    FTrimTrail
  4148.  
  4149. TruncateStr procedure                                           TvString
  4150. ──────────────────────────────────────────────────────────────────────────────
  4151. Declaration     Procedure TruncateStr(var S: String; Len: Byte);
  4152. Function        If string S is longer than length Len, then truncate S to
  4153.                 size Len characters.
  4154. See also    FTruncateStr
  4155.